Solved

Between dates query typed incorrectly or too complex???

Posted on 2010-08-29
5
353 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
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 39

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

In database programming, custom sort order seems to be necessary quite often, at least in my experience and time here at EE. Within the realm of custom sorting is the sorting of numbers and text independently (i.e., treating the numbers as number…
Introduction Hopefully the following mnemonic and, ultimately, the acronym it represents is common place to all those reading: Please Excuse My Dear Aunt Sally (PEMDAS). Briefly, though, PEMDAS is used to signify the order of operations (http://en.…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

803 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