Expression Too Complex in Access 2000

G

Grease

Hi,
Consider the following query:

SELECT crTbl.acct_1, crTbl.amount, crTbl.date
FROM crTbl
WHERE (((crTbl.acct_1)="Supplies") AND ((crTbl.date) Between
[Forms]![crReportOptionsFrm]![startDate] And
[Forms]![crReportOptionsFrm]![endDate]));


The query works fine on my own computer in Access 2002.
When converted to Access 2000 and used on an other computer,
I get the following error:
"This expression is typed incorrectly or is too complex to be evaluated.
Try simplifying the expression by assigning parts of the expression to
variables."

The problem is with the "Between dates" part of the expression.
The error msg appears in Access 2000.

Thanks for your help.
Cheers,
John
 
P

Pat Hartman

Date is a poor choice as a column name since Date is the
name of a function. Try surrounding the name with square
brackets as [crTbl].[date] - If that doesn't solve the
problem, I would suggest changing the column name in a
test copy of the table. If that works, you'll need to
change the column name.
 
B

Bill T.

John,
I find that when I get the message "Expression Too
Complex" while using parameterized queries, adding the
parameters into the Parameter list (via
Menu "Query", "Parameters...") often helps. Add the whole
form reference, e.g. "[Forms]![crReportOptionsFrm]!
[startDate]" and define it as a date.

HTH,
-- Bill T.
 

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