Close Multiple Forms

  • Thread starter Thread starter Brigham Siton
  • Start date Start date
B

Brigham Siton

On Access 97, can somebody advise me on how to close multiple forms at a
time using a command button?

Thank you very much.
 
Use the syntax:
docmd.close acform, <name of form in quotes>

Create a line for each form you want to close. If you are
not certain they are open you can do an "on error resume
next" command before the close commands and then set it
back to "on error goto 0" or wherever the error was set
before the commands.

You can find documentation in the access help about
docmd.close for further information.
 
Hi Brigham,

My name is Dennis Schmidt. Thank you for using the Microsoft Newsgroups.

You could close each form with a separate line of code similar to the
following:

DoCmd.Close acForm, "FormName1"
DoCmd.Close acForm, "FormName2"

I hope this helps! If you have additional questions on this topic, please
reply to this posting.

Need quick answers to questions like these? The Microsoft Knowledge Base
provides a wealth of information that you can use to troubleshoot a problem
or answer a question! It's located at
http://support.microsoft.com/support/c.asp?M=F>.

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2001 Microsoft Corporation. All rights
reserved.

Regards,
Dennis Schmidt
Microsoft Support
 
Back
Top