Calendar Control

S

shearness

I am trying to display 3 seperate 1 month calendars using the built in
Calendar Control in Access 2000. I want one to display last month, with
no date selected, the other to display this month with today's date
selected, and the last to display next month with no date selected. I
noticed that there are Previous Month functions etc., but I cannot seem
to get them to work. Where can I specify these functions? I have tried
to goto the Form's on open event, then I have specified something like
"calendar01.value=Now()". That didn't work. Any help would be
appreciated. I apparently don't know how to code these calendars. A
sample to be used on a form's open event would also be helpful. Thanks.
 
D

Dan Artuso

Hi,
to set it to today's date:
Me.yourControl.Value = Date

for last month with no day selected:
Me.yourControl.Month = Month(Date) - 1
Me.yourControl.ValueIsNull = True

for next month:
Me.yourControl.Month = Month(Date) + 1
Me.yourControl.ValueIsNull = True
 
D

Dan Artuso

Hi,
I should have mentioned:

To see all the properties and methods, press F2
to bring up the Object Browser.

Choose MSCal in the combo at the top left.
You can then see all the properties, methods and events.
Tp get help, highlight one and press F1.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top