I basically want a simple form that I can filter by three variables (SUPPLIER, FOOD, ANALYSIS). There are three comboboxes that let you pick from our short lists of suppliers, foods, and analyses, and a subform based on a query of those tables. This is a webform where I can't refer to the comboboxes in my query, so I am using localvars in a macro instead.
I have a search button that sets three local variables (my_SUPPID, my_ANALYSISID, my_FOODID) from the three combo boxes.
Expression = [cboSUPPS]
I then SetFilter with:
Where Condition = ([SUPPID]=[LocalVars]![my_SUPPID]) And ([FOODID]=[LocalVars]![my_FOODID])
Control Name subf_Analyses
and it works as expected.
However, if I add a third criteria for the remaining combo box:
Where Condition = ([SUPPID]=[LocalVars]![my_SUPPID]) And ([FOODID]=[LocalVars]![my_FOODID]) And ([ANALYSISID]=[LocalVars]![my_ANALYSISID])
I get no records. The button works for any of the combinations of two criteria, but fails when I add a third.
I've debugged the results of my localvars and they are as expected.
Any help would be appreciated!