Hi,
I have a form with 6 combo boxes in it. I have a command button, which should display the query results when clicked. Now, my challenge is to build the query based on the 6 different fields.
ie. query should be:
WHERE Field1 = "Value" AND Field2 = "Value" AND FIELD3 = "Value" AND FIELD4 = "Value" AND FIELD5 = "Value" AND FIELD6 = "Value"
Now, if the user chooses to select only 2 of the combo boxes (the rest 4 combo boxes are null), then the query should be based on those 2 only
WHERE Field1 = "Value" AND Field2 = "Value"
and so on.
Basically, I need to query based on the combination of combo boxes selected.
Is this possible? Is there an easy way of doing this?
Thanks
WS
I have a form with 6 combo boxes in it. I have a command button, which should display the query results when clicked. Now, my challenge is to build the query based on the 6 different fields.
ie. query should be:
WHERE Field1 = "Value" AND Field2 = "Value" AND FIELD3 = "Value" AND FIELD4 = "Value" AND FIELD5 = "Value" AND FIELD6 = "Value"
Now, if the user chooses to select only 2 of the combo boxes (the rest 4 combo boxes are null), then the query should be based on those 2 only
WHERE Field1 = "Value" AND Field2 = "Value"
and so on.
Basically, I need to query based on the combination of combo boxes selected.
Is this possible? Is there an easy way of doing this?
Thanks
WS