date - regional setting

  • Thread starter sigava77 via AccessMonster.com
  • Start date
S

sigava77 via AccessMonster.com

Hi,

Is there any way to verify what regional setting the users is using? In order
to change the format of the field that I input in a query?

Thanks,

Carla
 
A

Allen Browne

Carla, it is possible to get the user's regional settings from the registry,
but you don't need to.

If you are using a parameter in your query, just declare it.
Access will then interpret it correctly.
To declare it, choose Parameters on the Query menu.
(In Access 2007, it's on the right-side of the ribbon in Query Tools |
Design.)

If you are using an unbound text box on a form, just set the Format property
of the text box to:
General Date
or similar. Access will then interpret it correctly.

If you are building a SQL statement or Filter or WhereCondition or Criteria
as a string, use American format for the date, e.g.:
strWhere = "MyDateField = " & Format(Me.Text0, "\#mm\/dd\/yyyy\#")

More info about how to solve the 3 cases where Access can understand your
dates:
International Date Formats in Access
at:
http://allenbrowne.com/ser-36.html
 

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

Top