JKDeveloper0718
Programmer
I have a variable within the vba background in the form_open subroutine that I would like to pass from the main form (frmApplication) to a subform (sfrmFamilyMemebers) that is located on this main form.
the variable is an integer called lappid that needs to be passed to the subform and used as filter for a where clause within the sql string for a openrecordset command. When I try to access the variable in the subform within the form_current routine it gives me a null or at first 0 value then the proper value when more than one record is in the subform. If I try to access the variable from the form_open subroutine within the subform it will produce a zero. I have tried everything possible but it seems that the form_current is the only way to access the variable
any suggestions to why I get a 0 value for a variable passed from the main form to the subform. Also if you do a debug print it will show
0
213
the value I need is the 213 but it gves me 0 if I try accessing this from the form_Current routine
There has to be a way to pass there variables easier.
from the main form I call this in the form open to a variable in the subform
num = 12
Form_sfrmFamilyMembers.num = num
I can change this to a text box and it will pass but if I try to use it anywhere in the subform it will be zero.
the variable is an integer called lappid that needs to be passed to the subform and used as filter for a where clause within the sql string for a openrecordset command. When I try to access the variable in the subform within the form_current routine it gives me a null or at first 0 value then the proper value when more than one record is in the subform. If I try to access the variable from the form_open subroutine within the subform it will produce a zero. I have tried everything possible but it seems that the form_current is the only way to access the variable
any suggestions to why I get a 0 value for a variable passed from the main form to the subform. Also if you do a debug print it will show
0
213
the value I need is the 213 but it gves me 0 if I try accessing this from the form_Current routine
There has to be a way to pass there variables easier.
from the main form I call this in the form open to a variable in the subform
num = 12
Form_sfrmFamilyMembers.num = num
I can change this to a text box and it will pass but if I try to use it anywhere in the subform it will be zero.