Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Too Complicated Error Message

Status
Not open for further replies.

mytaurus2000

Technical User
Oct 4, 2006
138
US
I have a query that I want to make sure results are between start date and end date, and also showing a status of complete. My code is as follows:

SELECT tblApplicantData.SSN, tblApplicantData.StatusDate, [FirstName] & " " & [LastName] AS Name, tblApplicantData.FirstName, tblApplicantData.LastName, tblApplicantData.POBox, tblApplicantData.StreetAddress, [City] & ", " & [State] & " " & [Zip] AS CSZ, tblConsumerSupportProvider.CSPFirstName, tblConsumerSupportProvider.CSPLastName, tblApplicantData.StatusID
FROM tblApplicantData INNER JOIN tblConsumerSupportProvider ON tblApplicantData.SelectionCSP = tblConsumerSupportProvider.FedID
WHERE (((tblApplicantData.StatusDate) Between [Forms]![frmReportDialog]![StartDate] And [Forms]![frmReportDialog]![EndDate]) AND ((tblApplicantData.StatusID)="Completed"))
ORDER BY tblApplicantData.LastName;

But I'm receiving an error message telling me the above query is too complicated. Can someone help?
 
You may try this:
PARAMETERS [Forms]![frmReportDialog]![StartDate] DateTime, [Forms]![frmReportDialog]![EndDate] DateTime;
SELECT tblApplicantData.SSN, ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top