Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems updating Calendar control 11.0 in Access

Status
Not open for further replies.

CapnOats

Programmer
Apr 15, 2004
35
GB
Hopefully someone has com across this control before and could shed some light on my situation.

I have an ActiveX Calendar Control 11.0 ( class:MSCAL.Calendar.7) on a form in access, below it is a label.

In the Form's onOpen event i have the following code

Code:
dateLabel.Caption = Format(Date, "dd") + " " + Format(Date, "mmmm") + " " + Format(Date, "yyyy")
calendar.Value = Date

Which according to the Office help should put the date into the label and select the date in Calendar.

The label part works fine, but I cant seem to get the calendar control to display any other date than the default set at design time. I have tried using both .Date and .Day .Month and .Year, but to no avail.

Is there some switch or option i'm missing - I've never really used ActiveX before, but I thought it should work just like a normal control.

Regards,
Mike
 
How are ya CapnOats . . . . .

If I remember correctly the date value has to be formated. try:

[blue]calendar.Value = Format([purple]YourDate[/purple],"Short Date")[/blue]


Calvin.gif
See Ya! . . . . . .
 
Thanks for the help, but no, it still deonst seem to be working, it really is quite odd.

Ive tried several other things as well, including calendar.Today and calendar.Refresh, but still no further on.



Regards,
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top