running 52-week append query! help!

  • Thread starter Thread starter Guest
  • Start date Start date
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!
 
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
 
-----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.
 
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....
 
Back
Top