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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo box update 2

Status
Not open for further replies.

Bill0722

Technical User
Jul 1, 2006
29
US
I have a farily simple form of customers. I use a combo box to select the record I want by picking the names of customers. I also have a button that allows me to add a new record. However, when I add the record, it seems that I have to exit and re-enter the form to get the list of customer names in the combo box to update. Is there a way to force the list in the box to update.

 
Hello:
You want to do a me.requery or refresh in your code after your new record is entered.
'
Search the requery method in your help file or online help.
Regards
Mark
 
How are ya Bill0722 . . .
Code:
[blue]   Me![purple][b]ComboboxName[/b][/purple].Requery[/blue]

Calvin.gif
See Ya! . . . . . .
 
Two rather elementary questions.

First -- what is the significance of the Me! statement

And secondly, is it possible to requerry a Combo box in a primary form from a secondary form.

Thanks a bunch again
 
Hi, Bill0722,

Me is the VBA form/report self-identifier. It's a short-cut way of referring to the current form or report object in code.

Ken S.
 
In the AfterUpdate event procedure of the subform:
Me.Parent![combo name].Requery

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top