I use the custom function below (goes into a standard module) when I want to close multiple forms and leave only one open:
Code:
Function fCloseAll(Optional strForm As String)Dim icount As Integer, intX As Integer
'strform is the form/report required to be left open while all
'else are closed.
icount = Application.Forms.Count - 1
'close all forms
For intX = icount To 0 Step -1
If Forms(intX).Name <> strForm Then
DoCmd.Close acForm, Forms(intX).Name
End If
Next
End Function
Use it like this fCloseAll(Me.Name) 'from the form you want to leave open
Cheers,
Vlad