Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 05-31-2006, 01:48 AM   #1
Sam Summers
Newly Registered User
 
Join Date: Sep 2001
Location: Inverness, Inverness-Shire, Scotland
Posts: 612
Thanks: 65
Thanked 2 Times in 2 Posts
Sam Summers is an unknown quantity at this point
Wrong year inserted from Calendar Control

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

Sam Summers is offline   Reply With Quote
Old 05-31-2006, 02:35 AM   #2
ansentry
Access amateur
 
ansentry's Avatar
 
Join Date: May 2003
Location: Melbourne, Australia
Posts: 995
Thanks: 0
Thanked 7 Times in 7 Posts
ansentry is on a distinguished road
Send a message via Skype™ to ansentry
Have a look at my sample and see what date that produces on your system.

Works fine on mine.
__________________
Regards,



John A

Last edited by ansentry; 06-05-2006 at 12:25 PM.
ansentry is offline   Reply With Quote
Old 05-31-2006, 03:28 AM   #3
Sam Summers
Newly Registered User
 
Join Date: Sep 2001
Location: Inverness, Inverness-Shire, Scotland
Posts: 612
Thanks: 65
Thanked 2 Times in 2 Posts
Sam Summers is an unknown quantity at this point
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"

Sam Summers is offline   Reply With Quote
Old 05-31-2006, 04:52 AM   #4
ansentry
Access amateur
 
ansentry's Avatar
 
Join Date: May 2003
Location: Melbourne, Australia
Posts: 995
Thanks: 0
Thanked 7 Times in 7 Posts
ansentry is on a distinguished road
Send a message via Skype™ to ansentry
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
__________________
Regards,



John A
ansentry is offline   Reply With Quote
Old 05-31-2006, 05:23 AM   #5
allan57
Allan
 
allan57's Avatar
 
Join Date: Nov 2004
Location: UK
Posts: 336
Thanks: 0
Thanked 8 Times in 6 Posts
allan57 is on a distinguished road
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
__________________
Access 97, 2000 & 2007 on 95, 98, 2000 & XP; VB 6.0; SQL Server 2000
allan57 is offline   Reply With Quote
Old 06-02-2006, 02:38 AM   #6
Sam Summers
Newly Registered User
 
Join Date: Sep 2001
Location: Inverness, Inverness-Shire, Scotland
Posts: 612
Thanks: 65
Thanked 2 Times in 2 Posts
Sam Summers is an unknown quantity at this point
Thanks very much guys for your help.

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

Sam Summers is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Real Calendar with Access calendar control Banaticus Modules & VBA 13 07-14-2012 11:19 AM
No data Returned with criteria from Calendar Control weilerdo Queries 1 03-10-2006 12:07 AM
calendar control yessir Forms 2 05-19-2004 05:18 AM
Find Record using Calendar control mike wild Modules & VBA 0 04-26-2004 12:12 AM
Reset original values with Calendar Control brucesilvers Forms 1 10-28-2000 04:06 AM




All times are GMT -8. The time now is 04:41 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World