-----Original Message-----
This ought to do it:
' Close all open forms except "FrmHidden" and "FrmMain"
For lngX = Forms.Count - 1 To 0 Step -1
With Forms(lngX)
If .Name = "FrmHidden" _
Or .Name = "FrmMain" _
Then
' Spare this one
Else
DoCmd.Close acForm, .Name
End If
End With
Next lngX
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
.