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

J

Jason B

I am using three queries to draw data from a table. The first and
second queries draw the data from the tables, and joing them into one.
These two queries work just fine. The third query just takes the
information from the second query and groups, and sorts it. For some
reason I get the error message "This expression is typed incorrectly,
or it is too complex to be evaluated." The funny things about this is
that the query filters by a date format that is "MM\DD\YY" It works
for every day, accept "02/13/04"??? I know that it is Friday the
13th. So basically the queries work fine for everyday that I enter,
but that one, and then it gives me the "Complex" error message. Can
anybody help me please!

Jason
 
J

John Viescas

Are you on a non -U.S. machine? Note that the format makes no difference -
the internal value is the same. But you might solve it by giving it a
4-digit year literal.

WHERE MyTable.MyDate = #02/13/2004#

Note the # delimiters around the literal - are you including those?

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
 
J

John Vinson

I am using three queries to draw data from a table. The first and
second queries draw the data from the tables, and joing them into one.
These two queries work just fine. The third query just takes the
information from the second query and groups, and sorts it. For some
reason I get the error message "This expression is typed incorrectly,
or it is too complex to be evaluated." The funny things about this is
that the query filters by a date format that is "MM\DD\YY" It works
for every day, accept "02/13/04"??? I know that it is Friday the
13th. So basically the queries work fine for everyday that I enter,
but that one, and then it gives me the "Complex" error message. Can
anybody help me please!

Jason

Date literals must be in mm/dd/yy format (months first), or an
unambiguous format such as 17-Feb-2004; and (this is what's causing
the error message) they MUST be delimited by # marks. The "too
complex" error is because the slashes are interpreted as a division
operation.

If you don't think this is the problem (and it might not be) please
post the SQL. It's a bit difficult to guess what you might be doing
wrong when you don't tell us what you're doing!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top