ComboBox Requery

pgsibson

Registered User.
Local time
Today, 21:58
Joined
Jan 24, 2008
Messages
44
Hi Everyone

Here I am tearing my hair out again.
I have a simple form for data entry with the owner of the document selected from a combo box based on the table Owners. Selecting an owner puts theOwnerID into the underlying PatientInformation table. I have code that allows the NotInList to pick up entries that are not in the Owners table and allow adding them to that table. This all works but I cannot tab out of the field because the new name is not recognised and although I have tried to requery the combo in the afterupdate event it does not seem to work.

No errors are reported but the new name does not appear until I close the form and lose the record and then try again and the new entry is there.

I have tried the Docmd. requery Me!comboselOwner
and the Me!comboselOwner.requery to no avail

Any help out there? :confused:
 
You need to set Response = acDataErrAdded in the NotInList event to requery the ComboBox.
 
Thanks RuralGuy. Saved my life again.
 
Always glad to assist a neighbor across the pond. :D
 

Users who are viewing this thread

Back
Top Bottom