Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update combo box on form 2

Status
Not open for further replies.

EastIndian

Technical User
Mar 21, 2002
18
0
0
US
I have one form containing a combo box (frmMain). The values in the combo box can be changed/added to from another form (frmContract). Currently, I have to close and reopen frmMain after I save changes in frmContract in order to make my new changes visible in the combo box on frmMain. I know I need a type of requery routine to run, but I am not having any luck--I am not sure where to place it, or what the command should be. Any help would be appreciated.
Thank you!
 
From your post I'm assumiong that you open frmContract from frmMain, add the new values and then close frmContract to re-display frmMain.

If this is the case, in the frmContract's Form Close event, add this code:

Forms!frmMain.Refresh

This will referesh the combo box (as well as any other controls) on the frmMain. When frm Main is re-displayed, the values in the combo box list should include the newly added values.

HTH
Lightning
 
Your assumptions were correct and your suggestion worked like a charm! Thank you so much! [smile2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top