Solved

Between dates query typed incorrectly or too complex???

Posted on 2010-08-29
5
360 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 40

Accepted Solution

by:
als315 earned 500 total points
ID: 33553168
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
ID: 33553226
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 40

Expert Comment

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

Expert Comment

by:snoy
ID: 33553313
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
ID: 33553315
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

As they say in love and is true in SQL: you can sum some Data some of the time, but you can't always aggregate all Data all the time! Introduction: By the end of this Article it is my intention to bring the meaning and value of the above quote to…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

840 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