A
Andrew Tapp
I am able to open a form using the syntax;
DoCmd.OpenForm "frmFormName", acNormal
The main form frmFormName has a subform in it frmsubSubformName. Some code
in this subform refers to a value in a text field in the main form e.g.
Me.Parent!txtFieldName
This works well, with no issues, however this is where it gets interesting.
If i use the following code, in order to open multiple intances of the same
form;
Dim frm as Form
Set frm = New Form_frmFormName
I am unable to refer to the value of the text field in the main form and get
an error 2450 'can't find the form 'frmFormName' referred to in a macro
expression or visual basic code'.
Please advise the syntax for referring to the main form text field from the
subform when opened using 'Set frm = New Form_frmFormName'.
Many thanks.
DoCmd.OpenForm "frmFormName", acNormal
The main form frmFormName has a subform in it frmsubSubformName. Some code
in this subform refers to a value in a text field in the main form e.g.
Me.Parent!txtFieldName
This works well, with no issues, however this is where it gets interesting.
If i use the following code, in order to open multiple intances of the same
form;
Dim frm as Form
Set frm = New Form_frmFormName
I am unable to refer to the value of the text field in the main form and get
an error 2450 'can't find the form 'frmFormName' referred to in a macro
expression or visual basic code'.
Please advise the syntax for referring to the main form text field from the
subform when opened using 'Set frm = New Form_frmFormName'.
Many thanks.