Solved

Between dates query typed incorrectly or too complex???

Posted on 2010-08-29
5
364 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
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.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

696 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