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

Refresh main form when closing "pop-up" form

Status
Not open for further replies.

dunnma

Programmer
Aug 25, 2005
16
US
I have a command button that opens a "pop-up" form for the user to make changes to. I have everything working perfectly, except that when a user completes the tasks on the "pop-up" and it closes, the original "opener" does not reflect the new data.

Is it possible that when the user closes the "pop-up" form that it refreshes the main form?
 
Provided the Click event procedure of the button opens the form with acModal you may simply add a call to the Requery method on the next line of code.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
So change this:

DoCmd.OpenForm stDocName, , , stLinkCriteria

to this:

DoCmd.OpenForm stDocName, acModal, , stLinkCriteria

and add this:

Me!.form.Requery
 
OOps, sorry for the typo:
DoCmd.OpenForm stDocName, , , stLinkCriteria, , acDialog
Me.Requery

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I think that will work. My problem now is that part of the data is being set in the Form_Load() (and this is the part that is actually being updated in the "pop-up"). Is there something else other than ReQuery that will ReLoad the entire form (with the current query and stuff in form_load())?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top