Requery the combo box

R

Richard

Hi,

I use a buttom on my main form to call another form to add new contacts to
my contacts table. I have a combo box on the main form to display the
contacts name. But I have to close the main form in order to see the new
changes. How do I requery the combo box to see the new changes?


Thanks for any help
Richard
 
J

Jeff Boyce

Richard

Unless you tell Access to requery the combobox, it doesn't know you added
records.

cboYourCombobox.Requery

could be the last line in your command button's code.

Alternatively, you could use the LimitToList property of the combobox, and
the NotInList event to pop that form open, accept the new information, and
automatically refresh/requery the combobox on return (see Access HELP re:
NotInList). No command button needed...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top