Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've been working on an "Enter Scores" type of form for a database that's used in a competition. What should happen is - I pick a team from a combobox, enter their score in a text box, then upon the form's close, a separate table should have a record added with the team's number and score. However, somehow after changing a few things, this doesn't happen anymore.

I should mention that this is a maintenance problem, as this database was complete and used in previous competitions, but the user needed it to be slimmed down. I'm an Access 2007 newbie, but everything has been going fine until this. There were never any macros or events for "onClose" and the only things I changed were where the data for the combo box came from (to my knowledge at least).

So my question boils down to, how can I tell what happens when the form closes? If this isn't enough info, please let me know what you need. I can even upload the database if you'd like. Thanks!

share|improve this question
    
Have you tried adding an event for "onclose" to see if that fixes the problem? –  Raystafarian Mar 4 '12 at 13:12

1 Answer 1

In a nutshell; a form will save directly to a table if that table is selected as the record source for the form. By doing so allows for the controls (textbox, combobox, etc) to be linked to the fields in the table.

Check the form properties to ensure the table you are saving data to is the source. Then check each control to ensure it is linked to the field where you want to save it to in the table.

For instance; if you are using tblCompetition as your table, then it should be visible in the Record Source. If not, click the drop down and select it.

enter image description here

Chances are good because this once worked, that the form fields will relink themselves. If not, you will do the same for each control by selecting it and choose the field in the table it goes with. The fields will be available in the dropdown.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.