472,111 Members | 2,036 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,111 software developers and data experts.

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 3483

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
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.