I'm try to filter a report based on what a user puts in on a form.
For instance I've got the form to build the strWhere based on multiple selections from a List box. What I can't figure out is how to also sort based on 'phase' and vendor number.
For instance I want a strWhere that would only show me records in a report with a certain zip code with a certain vendor with a certain phase.
building this string doesn't work:
strWhere = "cTerritoryZip = '88888' OR cTerritoryZip = '99999' AND cVendor = 1 OR cVendor = 2 AND cPhase = 2"
How would I got about constructing the where statement to filter this properly.
Help is greatly appreciated.
For instance I've got the form to build the strWhere based on multiple selections from a List box. What I can't figure out is how to also sort based on 'phase' and vendor number.
For instance I want a strWhere that would only show me records in a report with a certain zip code with a certain vendor with a certain phase.
building this string doesn't work:
strWhere = "cTerritoryZip = '88888' OR cTerritoryZip = '99999' AND cVendor = 1 OR cVendor = 2 AND cPhase = 2"
How would I got about constructing the where statement to filter this properly.
Help is greatly appreciated.