We help IT Professionals succeed at work.

How to have several copies of the same forms open simultaneously

cornholme
cornholme asked
on
99 Views
Last Modified: 2017-04-03
I have a database that allows users to create job quotations and there are thousands of them. The principle Form has 5 sub forms and it works fine.  Now users wish to view several passed quotes and select one to a  create a new record.  The issue I have is  how to have several copies of the same form open simultaneously that a user can switch between?  Someone will have done this already, but where is it?

Regards
Cornholme
Comment
Watch Question

John TsioumprisIT Supervisor
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
The usual scenario is to open instances of the application not multiple instances of same form on the single application instance...i haven't tried if it's possible to see if this work...
CERTIFIED EXPERT

Commented:
how to have several copies of the same form open simultaneously that a user can switch between?
Not too sure how you want to present it but just an idea that you may use the Tab Control and put your relevant controls on to it. That may do the trick.

SnapShot.png

Author

Commented:
Hi Ryan
Thank you for your comment. I've already set Tabbed documents to true in Access Options. That part works ok.
cheers

Author

Commented:
Hi John,
Thank you for your feedback. Having several instances of Access open is going to confuse users I feel. I'd like to keep the Forms in one App. I was thinking maybe of using a Collection but I'm unsure is that the appropriate solution? I don't know. Anyway the law according to Sod has prevailed here, I just found Allen Browne's Managing Multiple Instances of a Form which advocates using Collections, so I shall follow that up. Just after when I've posted a question!

Regards
cornholme
CERTIFIED EXPERT
Most Valuable Expert 2015
Distinguished Expert 2018
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
Thank you Gustav the code looks interesting I shall follow it up

john cliviger
CERTIFIED EXPERT
Most Valuable Expert 2015
Distinguished Expert 2018

Commented:
You are welcome!

/gustav
Jim Dettman (EE MVE)President / Owner
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2017

Commented:
cornholme,

  Just to add a comment (and if you already realize this, apologies).

 The issue with multiple forms in Access is that while it can do them, once you do you can no longer refer to them by name as all will have the same name.

 So there are two basic techniques:

1. Create multiple copies of the form (say five frmCustomers; frmCustomer1, frmCustomer2, ......frmCustomer5)  and limit the user.   Limits resources, but bloats the app and makes code management more of a problem (five copies of the same form code if you have any).

2. Use a collection to track the forms opened and use that to deal with them.   This allows unlimited forms, but that might not be a hot idea because of resources.   At some point you'll get "out of resources" from Access if a user decides to open copy after copy.

  Which method is a toss up.  #1 is *fairly* manageable if you do it with one or two forms in the app and you can limit the user.   I actually find most users can't keep track of more than a few anyway.

  And while #2 is a nice feature to add to your app, you can shoot yourself in the foot.

  So in general, despite being a bit messy, I've typically leaned towards #1 myself when someone insists on the ability to have multiple copies of a form open.

Jim.

Author

Commented:
Jim, thank you for those comments that is really helpful!

regards
Cornholme