Between And

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

A quary has a LogTime field like 9/4/2005 time format.
It's Datatype is Date/Time.

I put in criteria ,an expression like Between [first date] And [last date].
When I run,I typed in 09/23/2005 as first date and 10/12/2005 as last date.
Or as a secod way, I typed in #09/23/2005# as first date and #10/12/2005#
as last date.
I don't know wy these two methods do not work.

Help, please.
 
Is the default DateTime format "mm/dd/yyyy" in your Regional Settings?

Describe what you meant by "do not work" (as expected). "Do not work" gives
no information for respondents to analyse.

It errors out? It doesn't return any row? It returns more rows than
expected? It returns less rows than expected? Any pattern regarding the
extra rows or missing rows?
 
Thak you for your reply.
1. My regional setting is "mm/dd/yyyy".
"Do not work" means "no rows returned after query".

Thank you.

Van T. Dinh said:
Is the default DateTime format "mm/dd/yyyy" in your Regional Settings?

Describe what you meant by "do not work" (as expected). "Do not work" gives
no information for respondents to analyse.

It errors out? It doesn't return any row? It returns more rows than
expected? It returns less rows than expected? Any pattern regarding the
extra rows or missing rows?

--
HTH
Van T. Dinh
MVP (Access)



Jay said:
A quary has a LogTime field like 9/4/2005 time format.
It's Datatype is Date/Time.

I put in criteria ,an expression like Between [first date] And [last
date].
When I run,I typed in 09/23/2005 as first date and 10/12/2005 as last
date.
Or as a secod way, I typed in #09/23/2005# as first date and #10/12/2005#
as last date.
I don't know wy these two methods do not work.

Help, please.
 
Please post the SQL of your query.


--
Steve
--------------------------------
"Veni, Vidi, Velcro"
(I came, I saw, I stuck around.)

Thak you for your reply.
1. My regional setting is "mm/dd/yyyy".
"Do not work" means "no rows returned after query".

Thank you.

:

Is the default DateTime format "mm/dd/yyyy" in your Regional Settings?

Describe what you meant by "do not work" (as expected). "Do not work" gives
no information for respondents to analyse.

It errors out? It doesn't return any row? It returns more rows than
expected? It returns less rows than expected? Any pattern regarding the
extra rows or missing rows?

--
HTH
Van T. Dinh
MVP (Access)



A quary has a LogTime field like 9/4/2005 time format.
It's Datatype is Date/Time.

I put in criteria ,an expression like Between [first date] And [last
date].
When I run,I typed in 09/23/2005 as first date and 10/12/2005 as last
date.
Or as a secod way, I typed in #09/23/2005# as first date and #10/12/2005#
as last date.
I don't know wy these two methods do not work.

Help, please.
 
Try wrapping your parameters in CDate() or specifically declaring your
parameters as to type.

Between CDate([first date]) And CDate([last date])

If this is a crosstab query then you MUST declare the parameter types.

First thing, with a crosstab query you MUST declare your parameters and if any
other queries are used in the crosstab their parameters must also be declared.

Open the query in design mode
Select Query: Parameters from the Menu
Fill in the EXACT name of the parameter in column 1
Select the data type of the parameter in column 2
 
Back
Top