Solved

Between dates query typed incorrectly or too complex???

Posted on 2010-08-29
5
332 Views
Last Modified: 2013-11-05
Hello,

Access keeps telling me that the SQL statement below is typed incorrectly or too complex to be evaluated. Anyone know what is so complex about this? Thanks for any help.
SELECT PartOrders.[DSSI Item], PartOrders.OrderDate, PartOrders.[Ordered By], PartOrders.OrderID, PartOrders.TaskID, PartOrders.Mfr, PartOrders.MfrPartNo, PartOrders.[Item Description], PartOrders.Supplier

FROM PartOrders

WHERE (((PartOrders.OrderDate)>=[Forms]![Parts Used Report]![Start Date] And (PartOrders.OrderDate)<[Forms]![Parts Used Report]![End Date]+1))

ORDER BY PartOrders.OrderDate;

Open in new window

0
Comment
Question by:G Scott
  • 2
  • 2
5 Comments
 
LVL 39

Accepted Solution

by:
als315 earned 500 total points
Comment Utility
Is your form (Parts Used Report) opened and fields:
[Forms]![Parts Used Report]![Start Date]
[Forms]![Parts Used Report]![End Date]
exists?
0
 
LVL 1

Author Comment

by:G Scott
Comment Utility
Yes and Yes. Even when everything is closed and I run the query and it prompts me for the dates it gives me that error.
0
 
LVL 39

Expert Comment

by:als315
Comment Utility
Can you upload DB with form and at least one string of data?
0
 
LVL 1

Expert Comment

by:snoy
Comment Utility
What about this :

SELECT PartOrders.[DSSI Item], PartOrders.OrderDate, PartOrders.[Ordered By], PartOrders.OrderID, PartOrders.TaskID, PartOrders.Mfr, PartOrders.MfrPartNo, PartOrders.[Item Description], PartOrders.Supplier
FROM PartOrders
WHERE (((PartOrders.OrderDate)>=[Forms]![Parts Used Report]![Start Date] And (PartOrders.OrderDate)<=[Forms]![Parts Used Report]![End Date]))
ORDER BY PartOrders.OrderDate;
0
 
LVL 1

Author Closing Comment

by:G Scott
Comment Utility
Sorry als315, you were right the first time. I had changed the form name. Very strange that it gave me the error message that it did though. It was kind of vague.  Thanks for your help.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now