running 52-week append query! help!

G

Guest

I'm trying to run a query to pull out a certain number of weeks of data from an append query. In the append query, I input the week by writing -- Week: "01/05/04". Them in the append table, it comes out as -- 01/05/04, without the quotation marks. The field is set as time/date

But when I go to run the criteria query to pull the designated weeks, I'm not quite sure what to input. In the week field, I have my table selected, and for criteria, i'm writing -- Between "01/06/03" And "01/05/04". But I keep getting back the error message "data type mismatch in criteria expression." How do i fix that and get it to run?

Help would be much appreciated!
 
S

Steve Schapel

Iris,

""s are the delimiter for text data type fields. For date/time fields
you need to use #s, so...
Between #01/06/03# And #01/05/04#

- Steve Schapel, Microsoft Access MVP
 
L

Lucas

-----Original Message-----
I'm trying to run a query to pull out a certain number of
weeks of data from an append query. In the append query,
I input the week by writing -- Week: "01/05/04". Them in
the append table, it comes out as -- 01/05/04, without the
quotation marks. The field is set as time/date.
But when I go to run the criteria query to pull the
designated weeks, I'm not quite sure what to input. In
the week field, I have my table selected, and for
criteria, i'm writing -- Between "01/06/03"
And "01/05/04". But I keep getting back the error
message "data type mismatch in criteria expression." How
do i fix that and get it to run??
Help would be much appreciated!
.
For your between clause try:

between #01/06/03# and #01/05/04#

You need the number sign to tell access that it's a date,
otherwise it's going to thing it's a string and give you a
type mismatch error.
 
G

Guest

okay, that makes sense. i was never sure just what those #s were for...

but i put in JUST what you told me and now it's telling me 'invalid argument.

what do i do now

thank you so much for your help so far....
 

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