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

Help with MSCAL 7 calendar control

P: n/a
Hello,

I am making use of the Active X calendar control (mscal.Calendar.7) in
several places in my main form, with the following code

Below is an example of the code I'm using for the controls.

Private Sub DateSold_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
SoldCal.Visible = True
SoldCal.SetFocus
If Not IsNull(DateSold) Then
SoldCal.Value = DateSold.Value
Else
SoldCal.Value = Date
End If
End Sub

My question is this:

How do I get out of the calendar control if it is inadvertently clicked on?
Currently, if the control is clicked on, the calendar is displayed, and
there is absolutely no way of making it dissappear without choosing a date.
Even if I focus on another control in the form, the calendar control still
remains visible.

Sometimes the field will be empty (i.e. in the code above, the DateSold
field will only contain a date if the item has actually been sold

What I would like to have:

A) is to be able to hit the escape key, or click outside the control, on
the background, or on another control, and have the calendar control
dissappear and leave the original (sometimes blank) value in the control.

B) Pop a message box up asking me "Change Date?" Y N. If No is clicked, the
calendar control will close leaving the original value

Thanks!

Tim G
Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.