• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1047
  • Last Modified:

This expression is typed incorrectly, or it is too complex to be evaluated.

Hi,

I'm having trouble with a query that used to work but recently decided to stop working even though it hasn't been modified.  I'm receiving the error "This expression is typed incorrectly, or it is too complex to be evaluated." and I determined that it's coming from my DateValue criteria.  I'm confused as to why this is happening though.

SELECT qryFinalizedStartDate.QuoteNumber, qryFinalizedStartDate.QuoteDesc, qryFinalizedStartDate.CustomerName, qryFinalizedStartDate.DraftedBy, qryFinalizedStartDate.PricingReviewedBy, qryFinalizedStartDate.QuoteReviewedBy, qryFinalizedStartDate.DateReceived, qryFinalizedStartDate.DateQuoteSent, [DateQuoteSent]-[DateReceived]+1 AS TurnaroundTime
FROM qryFinalizedStartDate
WHERE (((DateValue([DateQuoteSent]))<=DateValue([Enter an End Date])));

Open in new window


Basically it's just a query used to select a date range between two different date fields.  In the original query I use >=DateValue for my DateReceived field which works fine.  The second query uses <=DateValue for my DateSent field and that's where the issue lies.
0
paintb4707
Asked:
paintb4707
  • 2
  • 2
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Try removing DateValue from that expression

WHERE [DateQuoteSent]<=[Enter an End Date]

mx
0
 
paintb4707Author Commented:
If you mean remove DateValue from the criteria so that it just reads <=[Enter an End Date], I tried that and received the same error
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Specifically:


SELECT qryFinalizedStartDate.QuoteNumber, qryFinalizedStartDate.QuoteDesc, qryFinalizedStartDate.CustomerName, qryFinalizedStartDate.DraftedBy, qryFinalizedStartDate.PricingReviewedBy, qryFinalizedStartDate.QuoteReviewedBy, qryFinalizedStartDate.DateReceived, qryFinalizedStartDate.DateQuoteSent, [DateQuoteSent]-[DateReceived]+1 AS TurnaroundTime
FROM qryFinalizedStartDate
WHERE [DateQuoteSent]<=[Enter an End Date]
0
 
Rey Obrero (Capricorn1)Commented:
try this

SELECT qryFinalizedStartDate.QuoteNumber, qryFinalizedStartDate.QuoteDesc, qryFinalizedStartDate.CustomerName, qryFinalizedStartDate.DraftedBy, qryFinalizedStartDate.PricingReviewedBy, qryFinalizedStartDate.QuoteReviewedBy, qryFinalizedStartDate.DateReceived, qryFinalizedStartDate.DateQuoteSent, [DateQuoteSent]-[DateReceived]+1 AS TurnaroundTime
FROM qryFinalizedStartDate
WHERE (((DateValue([DateQuoteSent]))<=cDate([Enter an End Date])));

Open in new window


or this

Parameters [Enter an End Date] DateTime;
SELECT qryFinalizedStartDate.QuoteNumber, qryFinalizedStartDate.QuoteDesc, qryFinalizedStartDate.CustomerName, qryFinalizedStartDate.DraftedBy, qryFinalizedStartDate.PricingReviewedBy, qryFinalizedStartDate.QuoteReviewedBy, qryFinalizedStartDate.DateReceived, qryFinalizedStartDate.DateQuoteSent, [DateQuoteSent]-[DateReceived]+1 AS TurnaroundTime
FROM qryFinalizedStartDate
WHERE (((DateValue([DateQuoteSent]))<=([Enter an End Date])));

Open in new window



0
 
paintb4707Author Commented:
Disregard previous comment.  It worked, thank you!
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.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now