Closing non-active forms

M

Marshall Barton

PRH said:
Can anyone tell me the correct coding to close all open forms except the
active form?


For k = Forms.Count - 1 To 0 Step -1
If Forms(k).Name <> Me.Name Then
DoCmd.Close acForm, Forms(k).Name, acSaveNo
End If
Next K
 
Top