Multiple Criteria in Access
I have a project opening a report from a selected Access Database. The report uses a query from 'SaleTransactions' that has the following criteria:
[Start Date]
[End Date]
[Supplier_Name]
At the moment the database launches the report it (the report) asks the user for input for the criteria above. I want the user to use two DTPickers and a text box to select their input and the program to output it to the report.
So far I have this:
Code:
Dim apAccess As Access.Application
Set apAccess = New Access.Application
Dim sCriteria As String
sCriteria = "myField = 'this criteria'" 'use this to pass a criteria if you need one
apAccess.OpenCurrentDatabase ("t:\data\OchoRiosSales.mdb" )
apAccess.DoCmd.OpenReport "SaleTransactions", acPreview, , sCriteria
apAccess.Quit
Set apAccess = Nothing
However, this assumes I only have one criteria to input. How do I pass multiple criteria input to the database? Or is there a way I can modify the sCriteria string to include multiple criteria?
.
PC - Ubuntu 15.04 64bit Desktop
HP Pav G60-236US 3GB RAM Laptop, Ubuntu 15.04 64bit and Win7 Home
"So Daddy, how come you telling me stealing not right when YOU copying DVDs? How come? How Come?"
RIP Ramesh ...