Re: Can I pass OpenArgs to multiple instances of the same form?
- From: "Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx>
- Date: Wed, 5 Nov 2008 11:20:52 +0900
As you found, using the New keyword to open a form does not give you the option of OpenArgs, so you will be looking for alternate approaches.
Calling a generic function in Form_Open or Form_Load sounds fine. If you need the value after those events, perhaps you could use a hidden unbound text box.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Max Moor" <maxmoor@xxxxxxxxxxxxxxxxxx> wrote in message
news:Xns9B4CA06FCE9ACmaxmoorhotmailcom@xxxxxxxxxxxxxxxx
I've got a form I want to open multiple copies of. It will have a
subform like a checkbook register that displays different accounts' entries
from a general ledger. For example, the general ledger may have entries for
two accounts: Bank1 and Bank2. I want to be able to open a Bank1 register
form and a Bank2 register form at the same time, using the same base form.
I've been reading up on how to manage multiple instances of a form.
Allen Browne has a nice write up using a collection and the hWnd value to
keep track of the various instances.
Is there a way to pass OpenArgs when instanciating a form with the New
keyword?
If not, I considered opening each form hidden, then calling some public
interface function that I could pass the filter info to. That function would
finish the forms setup and make it visible. Is there a better method than
this that is safer or better practice?
Thanks & Regards,
Max
.
- Follow-Ups:
- References:
- Can I pass OpenArgs to multiple instances of the same form?
- From: Max Moor
- Can I pass OpenArgs to multiple instances of the same form?
- Prev by Date: Re: How To Open A Form When I Open The Database
- Next by Date: Passing An Argument To A New Form's Control
- Previous by thread: Can I pass OpenArgs to multiple instances of the same form?
- Next by thread: Re: Can I pass OpenArgs to multiple instances of the same form?
- Index(es):
Relevant Pages
|