Between dates query typed incorrectly or too complex???

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

LVL 1
G ScottAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
als315Connect With a Mentor Commented:
Is your form (Parts Used Report) opened and fields:
[Forms]![Parts Used Report]![Start Date]
[Forms]![Parts Used Report]![End Date]
exists?
0
 
G ScottAuthor Commented:
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
 
als315Commented:
Can you upload DB with form and at least one string of data?
0
 
snoyCommented:
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
 
G ScottAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.