cricketbird
Registered User.
- Local time
- Yesterday, 19:48
- Joined
- Jun 17, 2013
- Messages
- 108
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.
I then SetFilter with:
and it works as expected.
However, if I add a third criteria for the remaining combo box:
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!
CB
I have a search button that sets three local variables (my_SUPPID, my_ANALYSISID, my_FOODID) from the three combo boxes.
Code:
SetLocalVar
Name my_SUPPID
Expression = [cboSUPPS]
I then SetFilter with:
Code:
SetFilter
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:
Code:
Where Condition = ([SUPPID]=[LocalVars]![my_SUPPID]) And ([FOODID]=[LocalVars]![my_FOODID]) And ([ANALYSISID]=[LocalVars]![my_ANALYSISID])
I've debugged the results of my localvars and they are as expected.
Any help would be appreciated!
CB