acc 2003 class form referencing

G

Guest

trying to generate 2 active instances of same form at run time with:
'Module Declarations section:
Public FM1() As New Form_fmCompany
'Module Code section:
Sub OpenFM1(Comp_ID As Long)
ReDim FM1(0)
FM1(0).RecordSource = "SELECT ......"
FM1(0).Visible = True
FM1(0).Tag = "FM1" 'this tells running code that the instance being
tested is this one
End Sub
Problem is:
AllForms!fmCompany.IsLoaded returns true.
But Forms!fmCompany.Tag returns error 2450 ...can't find form
or Forms!FM1.Tag returns error 2450 ...can't find form.
How can i reference the 2nd instance?
Hope someone can help
Many thanks in anticipation
Madhouse
 
M

Marshall Barton

madhouse said:
trying to generate 2 active instances of same form at run time with:
'Module Declarations section:
Public FM1() As New Form_fmCompany
'Module Code section:
Sub OpenFM1(Comp_ID As Long)
ReDim FM1(0)
FM1(0).RecordSource = "SELECT ......"
FM1(0).Visible = True
FM1(0).Tag = "FM1" 'this tells running code that the instance being
tested is this one
End Sub
Problem is:
AllForms!fmCompany.IsLoaded returns true.
But Forms!fmCompany.Tag returns error 2450 ...can't find form
or Forms!FM1.Tag returns error 2450 ...can't find form.
How can i reference the 2nd instance?


You need to read:
http://allenbrowne.com/ser-35.html
 

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