calling calendar, get Automation Error
Arnold,
What do you expect from this line ?
If Not IsNull(cboDateReq) Then
Do you mean
If cboDateReq.ListIndex=-1 Then
'No selection made
Also, do you need the :
CalendarReq.SetFocus
NickHK
"Arnold Klapheck" wrote in
message ...
I have a form that calls on the calendar control but I get this error.
Automation Error -2147417848 The object invoked has disconnected from its
clients
below is the code:
Private Sub cboDateReq_MouseDown(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
CalendarReq.Visible = True
CalendarReq.SetFocus
If Not IsNull(cboDateReq) Then
CalendarReq.Value = cboDateReq.Value
Else
CalendarReq.Value = Date
End If
End Sub
I get the error message in the above code
|