Queries and Dates

P

pepenacho

I've got a couple fields I'm trying to pull up; they're all tied by date.

For some reason the query fails based on an input in the criteria field of
the query

such that

[Provide date:]

The table field is formatted and has an input mask set up for a short date.

I.e. in the table the date is visible as 2/25/2005

I assume in the query criteria I need to put in 02252005 or 2252005 but
neither makes the query run.

Any ideas as to why, or general pointers???

Pepe
 
S

Steve Schapel

Pepe,

The query criteria can be any valid date format. 02252005 or 2252005
are not valid date formats. Put your criteria in as 2/25/2005 or
2/25/05 or 2-25-05 or Feb/25/5 or.... whatever you like as long as
Access can see it's a date.
 
M

[MVP] S.Clark

Access does not recognize dates in that format. 12/12/2004 is understood,
but it wouldn't know what to do with 12122004.
 
P

pepenacho

Great Seve, thanks. I'll give that a shot.

I'll give that a shot.

Thank you.

Pepe

Steve Schapel said:
Pepe,

The query criteria can be any valid date format. 02252005 or 2252005
are not valid date formats. Put your criteria in as 2/25/2005 or
2/25/05 or 2-25-05 or Feb/25/5 or.... whatever you like as long as
Access can see it's a date.

--
Steve Schapel, Microsoft Access MVP

I've got a couple fields I'm trying to pull up; they're all tied by date.

For some reason the query fails based on an input in the criteria field of
the query

such that

[Provide date:]

The table field is formatted and has an input mask set up for a short date.

I.e. in the table the date is visible as 2/25/2005

I assume in the query criteria I need to put in 02252005 or 2252005 but
neither makes the query run.

Any ideas as to why, or general pointers???

Pepe
 
P

pepenacho

That totally worked Steve, thanks.

Steve Schapel said:
Pepe,

The query criteria can be any valid date format. 02252005 or 2252005
are not valid date formats. Put your criteria in as 2/25/2005 or
2/25/05 or 2-25-05 or Feb/25/5 or.... whatever you like as long as
Access can see it's a date.

--
Steve Schapel, Microsoft Access MVP

I've got a couple fields I'm trying to pull up; they're all tied by date.

For some reason the query fails based on an input in the criteria field of
the query

such that

[Provide date:]

The table field is formatted and has an input mask set up for a short date.

I.e. in the table the date is visible as 2/25/2005

I assume in the query criteria I need to put in 02252005 or 2252005 but
neither makes the query run.

Any ideas as to why, or general pointers???

Pepe
 
P

pepenacho

Steve, thanks for the reply. Another user clued me in. I've never seen this
covered in any of my ref. books. Strange.

pepe

[MVP] S.Clark said:
Access does not recognize dates in that format. 12/12/2004 is understood,
but it wouldn't know what to do with 12122004.

--
Steve Clark, Access MVP
FMS, Inc.
www.fmsinc.com/consulting

pepenacho said:
I've got a couple fields I'm trying to pull up; they're all tied by date.

For some reason the query fails based on an input in the criteria field of
the query

such that

[Provide date:]

The table field is formatted and has an input mask set up for a short
date.

I.e. in the table the date is visible as 2/25/2005

I assume in the query criteria I need to put in 02252005 or 2252005 but
neither makes the query run.

Any ideas as to why, or general pointers???

Pepe
 
Top