Avatar of SowleMan
SowleMan
Flag 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.
I
After SEEKing NEWDATA and putting the correct data in "CustShortName", I set Response = acDataErrAdded and exit the NotInList event.  Help, anyone?

Steve
Microsoft AccessMicrosoft Development

Avatar of undefined
Last Comment
SowleMan

8/22/2022 - Mon
John Tsioumpris

Somewhere you must have something wrong because i also use Response = acDataErrAdded and it works fine without requery
ASKER CERTIFIED SOLUTION
Jim Dettman (EE MVE)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SowleMan

ASKER
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!!
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23