How do you mean run it directly? If I take out that line, the query runs no problem. I need that line because I need to add to the query.. Hope that makes sense?
Here is the SQL code that is giving me much trouble on the openrecordset command:
SELECT Int1Table.InvoiceNumber, ClientTable.ClientName, ClientTable.ClientContact, ClientTable.Address1, ClientTable.Address2, ClientTable.City, ClientTable.Zip, Int1Table.FileNum, Int1Table.LastName, Int1Table.FirstName, Int1Table.LOS, Int1Table.Rate, Int1Table.Surcharge, Int1Table.Total, Int1Table.Invoiced, Int1Table.Received, Int1Table.ClientCode
FROM ClientTable INNER JOIN Int1Table ON ClientTable.ClientCode = Int1Table.ClientCode
WHERE (((Int1Table.Invoiced)=False) AND ((Int1Table.Received) Between [Forms]![InvoiceForm]![FromDate] And [Forms]![InvoiceForm]![ToDate]) AND ((Int1Table.ClientCode)='28000' Or ([Int1Table].[ClientCode])='28010' Or ([Int1Table].[ClientCode])='28012' Or ([Int1Table].[ClientCode])='28020')) ORDER BY Int1Table.ClientCode;
But the Int1Table.ClientCode = '#####' could go on for many more... There is just 4 to show you..
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.