ACCESS query expression that works on one computer but not another

H

heavenlyhost1

On my flash drive I have an expression in an ACCESS query like: Between
[Enter Beginning Date ex: 1-1-09] And [Enter Ending Date ex: 1-31-09]. It
works great, but when I copied the query to my desktop, I get this error:
"This expression is typed incorrectly, or it is too complex to be evaluated."
Why would the expression work from my flash drive and not when I paste it to
my database on my desktop?
 
J

John W. Vinson

On my flash drive I have an expression in an ACCESS query like: Between
[Enter Beginning Date ex: 1-1-09] And [Enter Ending Date ex: 1-31-09]. It
works great, but when I copied the query to my desktop, I get this error:
"This expression is typed incorrectly, or it is too complex to be evaluated."
Why would the expression work from my flash drive and not when I paste it to
my database on my desktop?

Try defining the query Parameters. Open the query in design view, and
rightclick the grey background of the tables; choose Parameters.

Copy and paste your parameters - [Enter Beginning Date ex: 1-1-09] for example
- into the left column of the grid (they must match exactly); define them as
DateTime using the dropdown in the right. This will ensure that Access treats
the user entry as a date, rather than some sort of division calculation.
 
H

heavenlyhost1

You were exactly right. The date fields were still in text format in the mdb
table on my desktop. Once I changed them to a date field, the criteria
worked perfectly. Thank you.

KARL DEWEY said:
Is the desktop field being evaluated text or DateTime?
--
KARL DEWEY
Build a little - Test a little


heavenlyhost1 said:
On my flash drive I have an expression in an ACCESS query like: Between
[Enter Beginning Date ex: 1-1-09] And [Enter Ending Date ex: 1-31-09]. It
works great, but when I copied the query to my desktop, I get this error:
"This expression is typed incorrectly, or it is too complex to be evaluated."
Why would the expression work from my flash drive and not when I paste it to
my database on my desktop?
 
H

heavenlyhost1

Thank you for taking the time to respond to my issue. It has been fixed now.
I do appreciate your help.

John W. Vinson said:
On my flash drive I have an expression in an ACCESS query like: Between
[Enter Beginning Date ex: 1-1-09] And [Enter Ending Date ex: 1-31-09]. It
works great, but when I copied the query to my desktop, I get this error:
"This expression is typed incorrectly, or it is too complex to be evaluated."
Why would the expression work from my flash drive and not when I paste it to
my database on my desktop?

Try defining the query Parameters. Open the query in design view, and
rightclick the grey background of the tables; choose Parameters.

Copy and paste your parameters - [Enter Beginning Date ex: 1-1-09] for example
- into the left column of the grid (they must match exactly); define them as
DateTime using the dropdown in the right. This will ensure that Access treats
the user entry as a date, rather than some sort of division calculation.
 

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