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

Close all forms? 1

Status
Not open for further replies.

simon551

IS-IT--Management
May 4, 2005
249
Hi all,
is there a command for close all open forms?

Thanks in advance,
simon
 
You may try this:
For i = Forms.Count - 1 To 0 Step -1
If Forms(i).Name <> Screen.ActiveForm.Name Then
DoCmd.Close acForm, Forms(i).Name
End If
DoEvents
Next

Another (brute force) way:
Application.Quit

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