Open the same form many times

  • Thread starter Thread starter XMan
  • Start date Start date
X

XMan

Is it possible to open up the same frmCustomer form while I'm in frmCustomer
form.

Ex: I'm updating IBM customer record with frmCustomer and it has business
with Microsoft. I would like to inquire on Microsoft record but for view
only. User can't update or delete Microsoft record. The second frmCustomer
should be in modal mode.

Microsoft can have other linked customers and I want to open them up too.

This one is tricky and very much appreciated your help. TIA.
 
XMan,
I don't believe you can open 2 instances of the same form within the same
mdb.
Whether I'm right or wrong on that, the easiest solution would be to
create a new form identical to the customer form, but named something like
ex. frmVendorLookups. Then display that form in a pop-up/modal form when
requested by the Customer form.
But, I think you should have a table of Customers and a table of Vendors
(1 to many), and your Microsoft record should be in there... as a vendor.
Of course Microsoft can be a customer too, but in regards to your IBM
customer, it's really a vendor. You're trying to open the same form twice
because your trying to "relate" a customer to a customer.
 
Use the New keyword to open another instance, e.g.:
Set frm = New Form_frmCustomer

The second instance exists only until the object it relies on goes out of
scope. If you want multiple independent instances, create your own
Collection to manage them.

Details at:
Managing Multiple Instances of a Form
at:
http://allenbrowne.com/ser-35.html
The article includes a sample Access 97 database to demonstrate the
technique.
 
Back
Top