The information in this article applies to:
Moderate: Requires basic macro, coding, and interoperability skills. This article applies to a Microsoft Access database (.mdb) and a Microsoft Access project (.adp). SUMMARY
This article shows you how to use Visual Basic for Applications to open
multiple instances of a form. Being able to open multiple instances of a
form enables you to work on more than one record at once. For example, in
an Order Entry application, you can start taking an order, pause and take a
second order, and then return to the first order, without losing any data.
Microsoft provides programming examples for illustration only, without warranty
either expressed or implied, including, but not limited to, the implied warranties of
merchantability and/or fitness for a particular purpose. This article assumes that you
are familiar with the programming language being demonstrated and the tools used to
create and debug procedures. Microsoft support professionals can help explain the functionality
of a particular procedure, but they will not modify these examples to provide added
functionality or construct procedures to meet your specific needs. If you have limited
programming experience, you may want to contact a Microsoft Certified Solution Provider
or the Microsoft fee-based consulting line at (800) 936-5200. For more information about
Microsoft Certified Solution Providers, please see the following page on the World Wide Web:
http://www.microsoft.com/mcsp/For more information about the support options available from Microsoft, please see the following page on the World Wide Web: http://www.microsoft.com/support/supportnet/overview/overview.asp MORE INFORMATIONThe syntax for opening multiple instances of a form includes a Set statement, the keyword New, and a form reference, as in the following example:
Because you can't use the New keyword to create a new instance of a lightweight object, any form that you intend to use the New keyword with must have its HasModule property set to True.
When you open multiple instances of a form, the original instance is the only form object that is stored permanently in the database. The other instances are temporary and are removed from memory when you close them. NOTE: When you close the original instance of a form, all other instances of the form are closed as well. To open multiple instances of a form, follow these steps. CAUTION: Following the steps in this example will modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and perform these steps on a copy of the database.
REFERENCESFor more information about using the New keyword with a Set statement, click Microsoft Access Help on the
Help menu, type Set in the Office Assistant or
the Answer Wizard, and then click Search to view the topics
returned. Additional query words: copy copies duplicate
Keywords : kbusage kbdta AccCon FmsHowto |
Last Reviewed: November 13, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |