Multiple Criteria in a Query

soldat452002

Registered User.
Local time
Yesterday, 19:02
Joined
Dec 4, 2012
Messages
50
Hello,

I want to create a query with multiple conditions. See attachment..Basically if the person Passes any of this trainings they need to show up in my query..how do you do it?

SELECT tblMasterUsers.userid, tblMasterUsers.Licenses, tblMasterUsers.firstname, tblMasterUsers.lastname, tblMasterUsers.email, tblMasterUsers.npn, tblMasterUsers.Region, tblMasterUsers.ABSID, CMPreport2014.[Ahip status], CMPreport2014.[LP Status] AS [AZ Product Training], CMPreport2014.[LP Status1] AS [CA Product Training], CMPreport2014.[LP Status2] AS [OR WA Product Training], CMPreport2014.[LP Status3] AS [Fraud Waster Abuse], CMPreport2014.[LP Status4] AS Compliance
FROM tblMasterUsers LEFT JOIN CMPreport2014 ON tblMasterUsers.npn = CMPreport2014.NPN
WHERE (((CMPreport2014.[Ahip status])="Passed") AND ((CMPreport2014.[LP Status3])="Passed") AND ((CMPreport2014.[LP Status4])="Passed") AND ((tblMasterUsers.Completed)=False) AND ((tblMasterUsers.Reject)=False)) OR (((CMPreport2014.[LP Status])="Passed")) OR (((CMPreport2014.[LP Status1])="Passed")) OR (((CMPreport2014.[LP Status2])="Passed"));
 

Attachments

  • SNAG_Program-0067.PNG
    SNAG_Program-0067.PNG
    45.4 KB · Views: 103
Perhaps you need to change the "AND"s in the where clause to "OR"s
 

Users who are viewing this thread

Back
Top Bottom