Dates in Report Filter

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

Guest

Hi, I wonder if someone can help me. If i enter the following string into
the filter property of a report it interprets the dates in US format (2nd Jan
to 2nd Oct 2006)

[start date] between #01/02/06# and #10/02/06#

If i use the same string as a criteria in a query it interprets it as UK
dates, which is what I want and what is selected in the Control Panel and
Regional Settings. Why does this happen ? Do I always have to use US date
formats in VBA and report/form filter strings ?

Thanks
Mark
 
You are exactly right, Mark: that's how Access is designed.

For details, see:
International Date Formats in Access
at:
http://allenbrowne.com/ser-36.html

The article explains that values entered into the interface are interpreted
according to your Regional Settings, whereas literals in VBA code or SQL
clauses are interpreted as US format so that a line of code will work the
same anywhere on the planet.
 

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

Back
Top