I have an Access 2003 database with a basic query that pulls parameters from a form. I want to exclude the last parameter of the WHERE clause (L.LicensedById = Forms!frmApplicationsTotal
y) if the value passed to it is 0. The column that holds the values is an integer and will contain a 1 or 2. Basically if the user doesn't select a value (1 or 2) then I want to return all results whether its a 1 or a 2.
Count(*) AS Total
dbo_tblApplications AS A
dbo_tblLicense AS L ON A.CredentialID=L.LicenseID
(A.DateReceived>=Forms!frmApplicationsTotal!FromDate And A.DateReceived<=Forms!frmApplicationsTotal!ToDate)
And (L.LicensedById = Forms!frmApplicationsTotal!LicensedBy);