US - UK Date problem (1 Viewer)

ansentry

Access amateur
Local time
Tomorrow, 08:58
Joined
Jun 1, 2003
Messages
995
I have tried to use Bob Larson's, "zsfrmCalendar" but am having the old UK - USA date format problem.

I would appreciate it if someone could look at my sample and provide a solution.

Thanks in advance.

PS Bob thanks for "zsfrmCalendar" anyway.
 

Attachments

  • AS_DateProblem.zip
    80.7 KB · Views: 65

ansentry

Access amateur
Local time
Tomorrow, 08:58
Joined
Jun 1, 2003
Messages
995
RuralGuy,

Yes I had looked there and this is what I found for unbound controls (which I am using on the form.)
Unbound Controls

Text boxes bound to Date fields are not a problem, but if the control is unbound (nothing in its Control Source property), how can Access know what data type you intend? If you are in the USA, it will probably guess correctly. If you use another date format, there's a high probability that your date will be interpreted wrongly.

In general, the Format property of the control has to do with how Access displays data and does not control data entry. However, if you set the Format property to "Short Date" or similar, Access is unable format an invalid entry, so only valid dates are accepted. And since Access now knows the data type, the erroneous interpretations of the date also cease.

As simple as it sounds, setting the Format property is enough to coerce Access into recognizing the data type for unbound controls.

I have entered "Short Date" in the Format property.

I will download a copy of his calendar and give it a go.
 

ansentry

Access amateur
Local time
Tomorrow, 08:58
Joined
Jun 1, 2003
Messages
995
RuralGuy,

Downloaded and installed Allen's calendar into my program and it works fine.

Thank you for pointing me in the right direction.
 

RuralGuy

AWF VIP
Local time
Today, 16:58
Joined
Jul 2, 2005
Messages
13,826
That is good to know. Bob's should work too but may need some tweaking. Do you have an original link to Bob's calendar you could post?
 

boblarson

Smeghead
Local time
Today, 15:58
Joined
Jan 12, 2001
Messages
32,059
I have tried to use Bob Larson's, "zsfrmCalendar"
Actually, that isn't mine. I just use it and I'm not sure who actually made it and uploaded it. I also needed to use a format to get it to the US date format.

PS Bob thanks for "zsfrmCalendar" anyway.
Again - not mine (just want to make that clear). I've just suggested using it as I like it myself and have used it in the past.
 

ansentry

Access amateur
Local time
Tomorrow, 08:58
Joined
Jun 1, 2003
Messages
995
Bob,

I read this in the module and assumed that it was ALL your work:
Module : basCalendar
' DateTime : 10/5/2006 10:08
' Author : Bob Larson (larsorob)

Sorry about that.

-------------------------------------------------------------

RuralGuy,

Sorry I don't have a link to the download, I think I downloaded it a long time ago.
 

Users who are viewing this thread

Top Bottom