View Full Version : Calendar question


mapat
01-10-2008, 06:00 AM
Hello everybody,

I have a simple calendar on form. I would like my program to perform some action as I change the dates on the calendar, for instance assign the value of that specific date that I click to a "txtBoxA" which is on the same form. How would I do this.

The calendar data property says:

Control Source _______________
OLE Class Calendar
Class MSCAL.Calendar.7

Thank you very much.

Moniker
01-10-2008, 06:21 AM
In the calendar's OnChange event, set the textbox to be equal to the calendar.

mapat
01-10-2008, 06:47 AM
The Calendar's events are:
OnUpdated
OnEnter
OnExit
On Got Focus
On Lost Focus

So, OnChange is not there. Anyways, I tried doing that already with all the above events including "On Updated" and when clicking on the dates it doesn't do anything.

Thanks

mapat
01-10-2008, 07:32 AM
Can anyone please give me a hand with this problem?

Thank you very much.

Zigzag
01-10-2008, 09:06 AM
Although the on click event for the calendar is not visible in the property list it will still work in the VBA code
try this

Private Sub MyCal_click()
'Clicking the Calendar Buttons calls this Code.
'Your Code goes here
End Sub

The name of the calendar in this example is called MyCal
Garry

mapat
01-10-2008, 09:36 AM
It works now.
Thank you very much for your help