Wrong year inserted from Calendar Control (1 Viewer)

Sam Summers

Registered User.
Local time
Today, 14:50
Joined
Sep 17, 2001
Messages
939
Hi there,

I have used Calendar controls before but this is a new one on me?!
When i click on the Calendar, what i am doing is inserting the date clicked into a textbox on another form.
The Calendar is set to todays date the system date is also correct and although i click on 31/05/06, what is being inserted is 31/05/20 ?????

Any ideas, because i dont?

Thanks in advance
 

ansentry

Access amateur
Local time
Tomorrow, 01:50
Joined
Jun 1, 2003
Messages
995
Have a look at my sample and see what date that produces on your system.

Works fine on mine.
 
Last edited:

Sam Summers

Registered User.
Local time
Today, 14:50
Joined
Sep 17, 2001
Messages
939
Thanks for your reply. It doesn't work for some strange Microsoft reason ???

This is the code i am using

Forms!CandidateFrm!CourseDate.SetFocus
Forms!CandidateFrm!CourseDate.Text = Me.Calendar1.Value
DoCmd.Close acForm, "DateSelect"
 

ansentry

Access amateur
Local time
Tomorrow, 01:50
Joined
Jun 1, 2003
Messages
995
That is strange, works fine for me.

Post a copy of your db and I will see if it works for me.

Why are you using this code? Is the form CandidateFrm not the active form?

Code:
Forms!CandidateFrm!CourseDate.SetFocus
Forms!CandidateFrm!CourseDate.Text = Me.Calendar1.Value
 

allan57

Allan
Local time
Today, 14:50
Joined
Nov 29, 2004
Messages
336
Try changing date format settings for the PC to Short date format dd/mm/yy

i.e.

1. Control Panel
2. Regional & Language Options
3. Regional Options
4. Date
5. Short Date Format = dd/mm/yy
 

Sam Summers

Registered User.
Local time
Today, 14:50
Joined
Sep 17, 2001
Messages
939
Thanks very much guys for your help.

It turned out to be the settings in the control panel.
 

Users who are viewing this thread

Top Bottom