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!

Refresh a Form 1

Status
Not open for further replies.

paulbradley

Programmer
Oct 9, 2002
158
0
0
GB
Is it possible to refresh a form? I have a form showing continuous records with an 'Add Record' button. I would like an event procedure OnClose of this form to refresh or reload the form behind. Any better ideas than just closing the form and opeing it again?

Thanks in advance.
 
Hi there

you can used a requery command, but do not know why you want it on the onclose event, and what do you mean by the form behind?
 
You can use the following line of VBA Code to refresh the record set for the main form (insert your form name of course)

Forms![your_main_form].Requery

I am using this right after a Docmd.Close statement, however it should work fine in the OnClose event.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top