Closing non-active forms

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
Back
Top