Form1 has an unbound combo box (cboAge) that shows different range of ages like
10-20
21-30
and so on.
Form2 has a bound textbox (TxtAgeRange) which retrieves the calculated range of ages from a query (Age query).
I cannot have an age column in the table because age is dynamic. Therefore, I'm calculating age by using a query (Age query).
The problem is with the following code when I'm opening up the form by matching cboAge and TxtAgeRange values.
If IsNull(Ages) = False Then FilterStr = FilterStr & "([TxtAgeRange] =""" & Me!cboAge & """) AND "
I'm getting error 2501 and its asking to enter the parameter for TxtAgeRange.
I'm not familiar with vba, and searched a lot to get the right answer. I appreciate any help I can get. Thanks in advance!
10-20
21-30
and so on.
Form2 has a bound textbox (TxtAgeRange) which retrieves the calculated range of ages from a query (Age query).
I cannot have an age column in the table because age is dynamic. Therefore, I'm calculating age by using a query (Age query).
The problem is with the following code when I'm opening up the form by matching cboAge and TxtAgeRange values.
If IsNull(Ages) = False Then FilterStr = FilterStr & "([TxtAgeRange] =""" & Me!cboAge & """) AND "
I'm getting error 2501 and its asking to enter the parameter for TxtAgeRange.
I'm not familiar with vba, and searched a lot to get the right answer. I appreciate any help I can get. Thanks in advance!