Hello World:
I pray you are doing great today!
My Question:
Is there a way to hide a pop-up calendar whenever the user clicks anywhere
outside of the calendar? Right now, I am using the code below, which whenever
the user clicks on this particular combo box, the calendar is shown. However,
the calendar doesn't disappear unless a date is selected from the calendar.
Beginning of Code:
Private Sub txt_DateCreated_MouseDown(Button As Integer, Shift As Integer, X
As Single, Y As Single)
Set cboOriginator = txt_DateCreated
If Not IsNull(cboOriginator) And cboOrinator <> "" Then
If MsgBox("Are you sure you want to update this date?",
vbYesNoCancel, "Click yes to update " & _
"date...") = vbYes Then
RequestDateCal.Visible = True
RequestDateCal.SetFocus
RequestDateCal.Value = cboOriginator.Value
Else
'txt_Date.SetFocus
End If
Else
RequestDateCal.Visible = True
RequestDateCal.SetFocus
RequestDateCal.Value = Date
End If
End Sub
'''End of Code
Maurice - 15 May 2008 08:22 GMT
I assume the calendar you are using is placed on a form. This form is
probably set to modal and therefore won't hide unless you select a date. This
is the way it is supposed to work. Why would you run the risk of forgetting
to close the calendarform? This could cause problems in other situations. A
solution might be to set the form to not modal that way it can be hidden
behind another form but be aware that this might cause problems in the rest
of your db. I'd advice you to use the current settings...
If I want to give the user an option I place the calendar behind the double
click of the textbox, that way if they want to enter there own option they
can by just tabbing to the control or just click once..
hth

Signature
Maurice Ausum
> Hello World:
>
[quoted text clipped - 35 lines]
>
> '''End of Code