Not Saving Info Until I close the Form

latino

Registered User.
Local time
Today, 11:26
Joined
Aug 22, 2000
Messages
11
I have a form and one of the fields is a drop down box with autofill. If I enter an information that it is new, it doesn't show in the drop down box even after I click on the Save button I created on the form. In order to show up, I need to close the form, then reopen it again.
I am running this particular drop down box from a query in order to facilitate the autofill and because it also automatically fill other fields when the information has been already entered.
I also tried linking the drop down box directly to the table instead of the query, but it did not worked.
So basically my main problem is that in order for the new information to appear in the drop down box I need to close the form and reopen it.
Any ideas what can I do here?
Thanks
 
In the AfterUpdate event of the Form, put:
Code:
YourComboBoxName.Requery
making sure to substitute your actual combo box name for the part that says "YourComboBoxName"
 
Are you using the NotInList event of the ComboBox? If so then post your NotInList code.
 
boblarson said:
In the AfterUpdate event of the Form, put:
Code:
YourComboBoxName.Requery
making sure to substitute your actual combo box name for the part that says "YourComboBoxName"

Beautiful. It worked great. The only difference is that I did it with GotFocus instead, so as soon as the user clicks on the field, it does the requery.

You learn something new every time.

Thanks!
 

Users who are viewing this thread

Back
Top Bottom