Date criteria

  • Thread starter Thread starter Sport
  • Start date Start date
S

Sport

When I try to use the following as the parameter for a query I get an error.

Between #date()# and #date()# -1

Basically I'm trying to automate the report to pull up the last 24hrs.
 
I think that should be:

Between (Date() -1) and Date()

The "#"s are certainly not needed, because Date() behaves like a
variable rather than a constant, and I think that Between expects you
to be going from lower to higher.

When I try to use the following as the parameter for a query I get an error.

Between #date()# and #date()# -1

Basically I'm trying to automate the report to pull up the last 24hrs.

Please respond to the Newsgroup, so that others may benefit from the exchange.
Peter R. Fletcher
 
I have tried that on a few tables I have and I think if
you set the format to short date, it works.
Take care.
Fons
 
Back
Top