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

"Re-querying"

Status
Not open for further replies.

celie

Technical User
Sep 16, 2003
5
0
0
GB
Hullo again, yet another question!

I've created a supplier form to update info in a supplier name combo box on my softwareinfo form. How do I re-query (refresh) the data in the softwareinfo form from the click of the close button on the supplier form?

Basically, I need to re-query a form from a close command button on another form.

Any help is much appreciated.
 
Docmd.FormName.Requery

HTH


"I know what you're t'inkin', ma petite. Dat Gambit... still de suave one, no?"
 
you can do forms!softwareinfo.requery from your button event i suppose.
 
What you need to do is refresh the source of the combo box on the first form - assuming it stays open while the supplier pop-up is there, when you close the supplier form try this:

Forms![SoftwareInfo]![combo-box-name].REQUERY

Next time you pull down the combo, it should show the new entries in the Supplier table.

Another, kind of kludgy, and not very elegant way, is to simply refresh the combo control every time it gets the focus - if there are 3000 suppliers in it, I'm not sure I'd do this, but if there are less than a hundred or so, it guarantees that the combo will always have a fresh list.

Inelegant, but effective.

HTH

Jim





If at first you don't succeed, skydiving probably isn't for you!
Another free Access forum:
More Access stuff at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top