Link to home
Start Free TrialLog in
Avatar of SowleMan
SowleManFlag for United States of America

asked on

How do I reload a combo box after NotInList Event fires?

When the NotInList event fires, I use the NewData and DAO's SEEK command to see if the NewData exists in a table. If so, I want to suppress error messages from ACCESS, and I want to requery the combo box and have NEWDATA displayed in the dropdown list.  

The query which supplies  the fields in the drop down list  is based on the contents of a text box ("CustShortName"). When the SEEK is successful, I store in the text box the value which should cause the requery to be successful. I'm missing something, because the combo boxes drop down list is empty and I get the standard ACCESS error about the string not being in the list.
After SEEKing NEWDATA and putting the correct data in "CustShortName", I set Response = acDataErrAdded and exit the NotInList event.  Help, anyone?

Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

Somewhere you must have something wrong because i also use Response = acDataErrAdded and it works fine without requery
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SowleMan


Thank you, Jim. Your experience paid off for me. I was reminded that the binding field can be different than the displayed field(s). I'm off and running!!