Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple List Boxes for Report Criteria HELP!!

Status
Not open for further replies.

carmo

MIS
Dec 15, 2002
92
CA
OK! I have a form that allows the user to select their criteria from a list box for a certain report. I have a function that loops through the values selected. These values are then in the WHERE clause of the openReport method. Now I want to add more list boxes to selection criteria BUT HOW CAN I USE MULTIPLE WHERE CLAUSES in the openReport method? Thanks!!
 
Wouldn't you need the criteria the user chose on the form in the query that is the basis for the report?

criteria row in the query
[Forms]![frmReports].[cmboProduct]

 
In the SQL statement that you are generating you can have numerous WHERE statements which can be connected by AND or OR.
The way you describe what you want - they will be ANDs like:

WHERE ProductID = [Forms]![frmReports].[cmboProduct] AND
WHERE ColorID = [Forms]![frmReports].[cmboColor]
 
Let me re-phrase....
I want to create a form that has 4 list boxes (with multiple selection available on each list box). These list boxes serve as the criteria for a query that feeds a certain report. I want the user to be able to do multiple selections on each list box, then click on the "submit" button to generate a report. What is the best approach to develop this?? Thanks everyone.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top