paintb4707
asked on
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.
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.
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])));
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Specifically:
SELECT qryFinalizedStartDate.Quot eNumber, qryFinalizedStartDate.Quot eDesc, qryFinalizedStartDate.Cust omerName, qryFinalizedStartDate.Draf tedBy, qryFinalizedStartDate.Pric ingReviewe dBy, qryFinalizedStartDate.Quot eReviewedB y, qryFinalizedStartDate.Date Received, qryFinalizedStartDate.Date QuoteSent, [DateQuoteSent]-[DateRecei ved]+1 AS TurnaroundTime
FROM qryFinalizedStartDate
WHERE [DateQuoteSent]<=[Enter an End Date]
SELECT qryFinalizedStartDate.Quot
FROM qryFinalizedStartDate
WHERE [DateQuoteSent]<=[Enter an End Date]
try this
or 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])));
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])));
ASKER
Disregard previous comment. It worked, thank you!
ASKER