greggranger
MIS
Am new to Microsoft Access project...please bear with me...
I'm attempting to reference a form object in a query that's used in determining a data set for a subform. I understand that using the Forms!MyForm!MyCotrol syntax will not work since sql does not recognize this format.
From reading a few previous threads, it seems that I will instead have to declare a variable to receive the value of MyControl, and then have that value passed to the query.
My first question is how do I declare a variable to receive the value of MyControl? Also, will the variable change each time the value of MyControl is altered?
Secondly, how do I pass the variable which holds the value of MyControl to the query?
Thanks in advance for any assistance!
I'm attempting to reference a form object in a query that's used in determining a data set for a subform. I understand that using the Forms!MyForm!MyCotrol syntax will not work since sql does not recognize this format.
From reading a few previous threads, it seems that I will instead have to declare a variable to receive the value of MyControl, and then have that value passed to the query.
My first question is how do I declare a variable to receive the value of MyControl? Also, will the variable change each time the value of MyControl is altered?
Secondly, how do I pass the variable which holds the value of MyControl to the query?
Thanks in advance for any assistance!