Calender control click event?

  • Thread starter Thread starter James Goodman
  • Start date Start date
J

James Goodman

I have an app which has been running perfectly for approx 18months. It uses
the calender control, & the click event. It was last used on 27/01/04, when
it worked correctly. I have been using the click event to assign its value
to a text-box control.

Since this date the calender control's click event has vanished?

Can anybody confirm this is not just me going mad?
 
I don't every remember using the on-click event with much success. I have
ALWAYS used the after update event. I suggest you do the same.

So, use:

Private Sub ActiveXCtl0_AfterUpdate()

Me.Text1 = Me.ActiveXCtl0.Value

End Sub


You will note in the events property sheet, the after update is NOT listed,
but it does in fact work. (so, just like VB activeX stuff, you "know" the
event to use, and not use the property sheet to add the event).

Also note how I used the ".value" to get the data. DO NOT use:

Me.Text1 = Me.ActiveXCtl0

But always use:

Me.Text1 = Me.ActiveXCtl0.Value

I see the control break on many machines if you don't use .value.

On the other hand, due to problems with that control (or any activeX
control), I long ago dumped the calendar control and use other widely
available solutions.

Check out:

http://www.granite.ab.ca/access/calendars.htm
 
I use the _Click event with calendars without any problem.
Make sure you declare it like this...

Private Sub MyCalendar_Click()

End Sub
 
It would appear the Click event was present in common controls SP5, but not
Common Controls SP6...
 
Back
Top