multiple instances of a form x 2

M

Miranda

hi ,

my main form is able to load multiple instances of the second form. i then
want the 2nd form to load multiple instances of the third form. I have the
first and second form operating correctly. but i'm having probs getting the
3rd form going. i'm using the hwnd as an identifier for the forms. when the
third form is opened i want to pass the 2nd forms hwnd to it but i don't
know how to do this

does anyone have any experience with such things?

any help would be greatly appreciated!!
 
W

Wayne Morgan

Try passing the hWnd as a text string in the OpenArgs argument of the
DoCmd.OpenForm command. You can them get that string in the opened form with

strGetString = Me.OpenArgs
 
M

Miranda

thanks wayne, i would do that except there is no docmd.openForm command. i
have a function with something like this:

Dim frm2 As Form
Set frm2 = New Form_dataEntryForm

so because i don't have that docmd i don't know how to pass the value

any other ideas?

thanks!! Miranda
 
W

Wayne Morgan

You could use a "global" variable. Set the value just before you open the
second form and clear it in the form when it opens.
 
M

Michel Walsh

HI,



Define a public form property ( or just a public variable in the declaration
section of the form, that would do nicely to simulate a get/let property)
in Form_dateEntryForm, then:

Dim frm2 As Form
Set frm2 = New Form_dataEntryForm
frm2.YourAddedPropertyName = ... extra info here...
frm2.Visible = true




Then, each instance of Form_dateEntryFrom can have a unique something you
may refer to, further on, in the code.



Hoping it may help,
Vanderghast, Access MVP
 
M

Miranda

Great, thanks. i will try this!

Michel Walsh said:
HI,



Define a public form property ( or just a public variable in the declaration
section of the form, that would do nicely to simulate a get/let property)
in Form_dateEntryForm, then:

Dim frm2 As Form
Set frm2 = New Form_dataEntryForm
frm2.YourAddedPropertyName = ... extra info here...
frm2.Visible = true




Then, each instance of Form_dateEntryFrom can have a unique something you
may refer to, further on, in the code.



Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top