strange problem with a date varible

snoopy22

Registered User.
Local time
Today, 09:32
Joined
Oct 1, 2004
Messages
45
Hi everyone,

I've got a project that works fine at home but when I try to
open It at my office it's not wotking properly.
I've managed to locate the problem but I dont know why It happens.
the problem is this:

I've got:

1. txtDate(textbox)
2. lstNames(list of all the customers)
3. cmdPre(button that preview the report of the chosen customer from
the written date and forward)

normally at my home I put in the txtDate a reverse date meaning:
11 in January 2005 is : 1/11/2005


but at my office, from some reason the line:

"If rs![LastUpdate] < txtDate Then"

consider the txtDate as 1 in november 2005

and the command:

Me.RecordSource = "select * from transaction where Name = " & """" & Forms!printre.MyFilter _
& """" & " and LastUpdate > #" & txtDate & "#"

consider the txtDate as: 11 in January 2005

why does it happens?
I'm using office 2003 at both my home and my office!
 
Check the regional settings. It sounds like you've got one on English (US) and one on English(UK)

Col
 
Access, despite being able to format dates, is so American in that it uses that particularly horrible month, day, year format.

When using dates in queries always use the date formatted to the American way to counter any ambiguities in the date.
 
Thanks!

ColinEssex said:
Check the regional settings. It sounds like you've got one on English (US) and one on English(UK)

Col


you're right! thanks a lot!
 

Users who are viewing this thread

Back
Top Bottom