469,963 Members | 1,242 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,963 developers. It's quick & easy.

Help with MSCAL 7 calendar control

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
0 3328

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Michael Holberton | last post: by
1 post views Thread by jim_parent_804 | last post: by
2 posts views Thread by Caesar Augustus | last post: by
reply views Thread by Pavan | last post: by
1 post views Thread by Robert Waggoner | last post: by
7 posts views Thread by William (Tamarside) | last post: by
1 post views Thread by rainxy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.