Refresh combo box list

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a control (Zip Code) on a main form set to NotInList=Yes. When a user
types in data that is not on this list, the error message appears and a Zip
Code form pops up with an ID (primary key), the zip code field, city, and
state fields. The user can then enter the new information into this form.
This form has a command button to save the record, and one to close the form.
After the form is closed, the combo box list does not update/refresh with
the new data even if you go to another control and then go back to the zip
code control. The only way to get the new data into the list is to close the
main form and reopen it which is inconvenient. Both forms are based on the
tables. Should I the zip code control on the main form maybe be based on a
query instead? Can anyone help me fix this?

Thanks in advance.

SVE
 
Do you have the command

Response = acDataErrAdded

after the OpenForm call? Also, are you opening the form using the acDialog
window mode argument to pause the code until you close the form?
 
Thanks for the response.

Actually I used a macro to open the form when the NotInList event occurs.
Would I be better off using vb code? If so, do you have the code to make the
action occur?

Thanks again.
SVE
 
Yes, a macro doesn't have all of the options that the VB code has,
especially the parameters that are automatically available in the VB event.
 
Back
Top