G Guest Nov 19, 2005 #1 Can anyone tell me the correct code for closing all open forms using an event procedure?
R Rick Brandt Nov 19, 2005 #2 PRH said: Can anyone tell me the correct code for closing all open forms using an event procedure? Click to expand... Sub CloseAllForms() Dim i As Integer For i = Forms.Count - 1 To 0 Step -1 DoCmd.Close acForm, Forms(i).Name Next i End Sub
PRH said: Can anyone tell me the correct code for closing all open forms using an event procedure? Click to expand... Sub CloseAllForms() Dim i As Integer For i = Forms.Count - 1 To 0 Step -1 DoCmd.Close acForm, Forms(i).Name Next i End Sub
G Guest Nov 19, 2005 #3 Thanks for the advice. I should have said that I want to leave the active form open. How would this change the code?
Thanks for the advice. I should have said that I want to leave the active form open. How would this change the code?