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