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

If a form is open, requery 1

Status
Not open for further replies.

krets

Technical User
Dec 29, 2006
214
US
How do I test to see if a form is open before I requery it with VB? When a user clicks a "Save" button on a certain form, I would like to requery another form if it is open.
 
something like this ?
stDocName = "your form name"
If CurrentProject.AllForms(stDocName).IsLoaded Then
Forms(stDocName).ReQuery
End If

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Just use docmd.OpenForm("<form_name>") -- it will automatically use the open instance of the form by default. The tricky part is if you want it to open a different copy.


TMTOWDI - it's not just for Perl any more
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top