I have a search form1 with a combo box (cboAge).
"Under 18
18-25
26-35
Over 35"
Once the user chooses from one of the options, another form2 should open up with all the matching ages. I've created a text field (txtAge) in form2 which calculates the age based on the date of birth field from the table.
I used the macro and stated if combo box of age from form1 is "Under 18" then I'm opening a new form2 and in the where clause trying to get all the records that are less than 18 years old.
If [cboAge]='Over 18'
Open Form [form2]
Where = [forms]![form2]![txtAge] < 18
The above code is not even opening form2 when I select anything from cboAge.
Please help me out here. I'm totally new to the macros and the coding. Thanks!