Change year range on ActiveX calendar on Access form

105 pts.
Tags:
ActiveX
Microsoft Access
Microsoft Access Calendar control
Microsoft Access forms
Hi. I want to change the year range on the calendar in microsoft access. At the moment it goes from 1900 to 2100. really annoying! I have the ActiveX Calendar 11.0 version. On the microsoft website it says to add the code: StartDateCalendar.Year = 2001 but how do you do this? the only other thing is to build my own calendar but that's just more work! thanks!
ASKED: April 16, 2009  10:01 AM
UPDATED: April 17, 2009  8:38 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

I do not see any way to change the default range on the the year dropdown. I found that same code you did, but I do not think it is trying to tell us how to set the StartDateYear. I think StartDate is the name they gave their instance of the control. For instance, I opened an Access form design and dropped in a Calendar Control. It was named Calendar0 by Access. In the OnEnter event I added

Private Sub Calendar0_Enter()
Me!Calendar0.YEAR = 2005
End Sub

Then whenever I enter the calendar control, it has 2005 as the year. But the dropdown can still go from 1900 to 2100.

The description of the CalendarControl property Year notes that it can be anything between 1900 and 2100, so I’m inclined to think that’s built into the Year property.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Dontgetit
    Dam. that is so ridiculously annoying.but thanks for finding the answer- I would have wasted another day trying to do it. So I guess this means I just have to build a calendar from scratch. Anyone know of a website with step-by-step instructions? The annoying thing is that I have one someone else made, I just can't unravel the code to make it do what i want. frustating.
    105 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following