Closing non-active forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can anyone tell me the correct coding to close all open forms except the
active form?
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top