I have a form that runs a VB function then calls a subform. I need to use the computed VB variable for my filtering in the subform.
Is there a way to do this?
Here is the VB code I have.
NewClientCode = Chr$(39) & rst.Fields(0).Value & Num & Chr$(39)
' Go to the New Client form
DoCmd.OpenForm ("NewClientEntry"
I set my Record Source to my SQL Query and the Filter to "[Customer_Code] = Forms!GetInitials!NewClientCode", but it didn't work. "GetInitials" is the form that has runs the above VB code.
Thanks for any help you might be able to give.
Francie
Is there a way to do this?
Here is the VB code I have.
NewClientCode = Chr$(39) & rst.Fields(0).Value & Num & Chr$(39)
' Go to the New Client form
DoCmd.OpenForm ("NewClientEntry"
I set my Record Source to my SQL Query and the Filter to "[Customer_Code] = Forms!GetInitials!NewClientCode", but it didn't work. "GetInitials" is the form that has runs the above VB code.
Thanks for any help you might be able to give.
Francie