requery a combo box

G

Guest

I have a combo box set up so that if the item I am looking for is not a
member of the recordset I can doubleclick and go to a form to add the item.
The next line of code after "Docmd.openform frmname" is "me.combo0.requery".
Thus, after closing the form, I want to requery the combo, but the item does
not show up when I click on the combo. Is this the wrong place to do a
requery?
 
G

Guest

Hi Steve

Try and open the form as dialog
docmd.OpenForm "FormName",,,,,acDialog

that will suspend the code from continuing, so it will requery after adding
the record
 
G

Guest

C"Steve said:
I have a combo box set up so that if the item I am looking for is not a
member of the recordset I can doubleclick and go to a form to add the item.
The next line of code after "Docmd.openform frmname" is "me.combo0.requery".
Thus, after closing the form, I want to requery the combo, but the item does
not show up when I click on the combo. Is this the wrong place to do a
requery?

Ofer's suggestion is certainly a good one; another technique is to use the
combo's Not In List event. You can set the parameters to automatically
requery the combo on return from the dialog form (or other code). See the
online help for NotInList method.

John W. Vinson/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

Similar Threads

Requery combo box 4
Can't Requery Combo Box on Subform 1
Combo box issue 8
Requery Combo boxes 5
Combo Box contents should have changed 2
Requery 3
Requery ? 2
Combo box contents not updating 1

Top