multiple instances of a form x 2

  • Thread starter Thread starter Miranda
  • Start date Start date
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!!
 
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
 
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
 
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.
 
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
 
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
 
Back
Top