I have to pass this value, declared as Variant, from one module (form) to another module (another form). But this variable is not one of the objects of any query, table or forms. It's a variable being calculated in a module. Now how can I pass this value to a different module? Here's the example:
Function glrQBF_DoHide(frm As Form)
Dim varSQL As Variant
Dim strParentForm As String
'Get the name of the Parent form
strParentForm = Left(CStr(frm.Name), Len(CStr(frm.Name)) - 4)
'Create the approprite Where clause based on the fields with data in them
varSQL = glrDoQBF(CStr(frm.Name), False)
'Open the Parent form filtered with the Where clause genereated above
DoCmd.OpenForm strParentForm, acNormal, , varSQL
'Make this *_QBF form invisible
frm.Visible = False
' DoCmd.Close
End Function
As you can see the variable varSQL is being created in the above module and I would like to pass the value of varSQL to another module which is a part of a different form.
Please help me. Thanks.
Function glrQBF_DoHide(frm As Form)
Dim varSQL As Variant
Dim strParentForm As String
'Get the name of the Parent form
strParentForm = Left(CStr(frm.Name), Len(CStr(frm.Name)) - 4)
'Create the approprite Where clause based on the fields with data in them
varSQL = glrDoQBF(CStr(frm.Name), False)
'Open the Parent form filtered with the Where clause genereated above
DoCmd.OpenForm strParentForm, acNormal, , varSQL
'Make this *_QBF form invisible
frm.Visible = False
' DoCmd.Close
End Function
As you can see the variable varSQL is being created in the above module and I would like to pass the value of varSQL to another module which is a part of a different form.
Please help me. Thanks.