closing forms

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

Guest

docmd.close - close 1 single form
how can i close all form that are open in the database.

thanks
 
Dim i As Integer
For i = Forms.Count - 1 to 0 Step -1
DoCmd.Close acForm, Forms(i).Name
Next

Use error handling in case a form is dirty and the record cannot be saved.
 

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