troubleshooting Question

Query not filering correctly

Avatar of seamus9909
seamus9909 asked on
Microsoft Access
5 Comments1 Solution359 ViewsLast Modified:
I have a query with the following SQL that is not filtering out records that don't have the company name of *USAA Insurance Company"  I have attached the results of the query and as you can see there are records that have a value other than "USAA Insurance Company" being returned.

SELECT DISTINCTROW tblClaims.ServiceID, Customers.Company, tblClaims.StatusID, tblClaims.InvoiceID, tblClaims.CurrentYear, tblClaims.FileNo, tblClaims.Patient, tblClaims.Fname, tblClaims.Lname, tblClaims.PatientPhone, tblClaims.PatientCell, tblClaims.PatientEmail, tblClaims.DOI, tblClaims.[Claim#], tblClaims.[Date/Rec'd], tblClaims.[Date of IME], tblClaims.[$Billed], tblClaims.[$Paid Doctor (cost)], tblClaims.[$Rec'd (income)], tblClaims.[Date Check Deposited], tblClaims.ServiceID, tblClaims.Specialty, tblClaims.State, tblClaims.Reviewer, tblClaims.[Gross Profit], tblClaims.Comments, tblClaims.[Complete Date], tblClaims.EmployeeID, tblClaims.Cases, tblClaims.Description, tblClaims.Calls, tblClaims.DateIMESent, tblClaims.PrePaid, tblClaims.AmountofPrepaid, tblClaims.InvoiceSent, tblClaims.InvoiceSentDate, tblClaims.PaidDoctor, tblClaims.AmountPaidDoc, tblClaims.AdditionAmountDoc, tblClaims.InvoiceReceived, tblClaims.InvoiceRecDate, tblClaims.DateofLoss, tblClaims.Lawyer, tblClaims.DateofService, tblClaims.DoctorID, tblClaims.DateofBirth, tblClaims.TimeofIME, tblClaims.PatientAddress, tblClaims.PatientAddress2, tblClaims.PatientCity, tblClaims.PatientState, tblClaims.PatientZip, tblClaims.ACT6, tblClaims.LegacyInvoicenumber, tblClaims.AddRecordsReceived, tblClaims.DateAdditionalRecordsRcvd, tblClaims.RequesttoSpeaktoReviwer, tblClaims.Insured, tblClaims.InsuranceAgency, tblClaims.ReconRequesttoSpeak, tblClaims.ReconRequest, tblClaims.ReconRequestDate, tblClaims.ReconAdditionalRecords, tblClaims.[AIS-Contact], tblClaims.[Date Rec'd (income)], tblClaims.ACT6InitReview, tblClaims.Act6ReconReview, tblClaims.[Client - Contact]
FROM Customers INNER JOIN tblClaims ON Customers.ID = tblClaims.[Client - Contact]
WHERE (((Customers.Company) Like "USAA INSURANCE COMPANY") AND ((tblClaims.StatusID)=1)) OR (((tblClaims.StatusID)=2)) OR (((tblClaims.StatusID)=5));
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros