By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,654 Members | 1,582 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,654 IT Pros & Developers. It's quick & easy.

ActiveX calendar control in 97 - how is value updated?

P: n/a
MLH
I have code below in the OnUpdated property setting
for the ActiveX control. However, when I left click a
new date on the calendar in an open form, the code
does not run (IE, msgbox does not display). What am
I doing wrong?

Private Sub ActiveXCtl9_Updated(Code As Integer)
MsgBox "After Updated event fired for ActiveXCtl9"

End Sub

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

MLH wrote:
I have code below in the OnUpdated property setting
for the ActiveX control. However, when I left click a
new date on the calendar in an open form, the code
does not run (IE, msgbox does not display). What am
I doing wrong?

Private Sub ActiveXCtl9_Updated(Code As Integer)
MsgBox "After Updated event fired for ActiveXCtl9"

End Sub


The ActiveX calendar control in A97 has an AfterUpdate event. Perhaps
that will accomplish what you need. On my Form_Load event I do
something like:

txtBeginDate = Format(DateAdd("d", -6, Now()), "m/d/yy")
ActiveXBegin.Value = CDate(txtBeginDate)
txtEndDate = Format(Now(), "m/d/yy")
ActiveXEnd.Value = CDate(txtEndDate)

where tbxBeginDate and txtEndDate are locked. Then

Private Sub ActiveXBegin_AfterUpdate()
txtBeginDate = CStr(ActiveXBegin)
End Sub

Private Sub ActiveXEnd_AfterUpdate()
txtEndDate = CStr(ActiveXEnd)
End Sub

so that clicking on the ActiveX control puts the date into the
appropriate text box. I know the dates are always valid. Using just
the ActiveX controls has caused confusion for the users in situations
such as changing the month but not clicking on the day. The textboxes
show them exactly what dates will be used.

James A. Fortune

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.