L
Lee Hunter
I have the same problem as described in Q198932, but my
text box is set to no Autocorrect. It is an unbound text
box for date, used with an ActiveX Calendar control. I
can set the calendar control value property and its
visible property in the GotFocus event of the text Box,
but when I try to use the SetFocus property on the
calendar control, I get the error.
Here's the code snippet:
Private Sub Date_In_GotFocus()
Dim dDate As Date
dDate = Now()
If Not IsNull(Date_In) Then
MyCalendar.Value = Me.Date_In.Value
Else
MyCalendar.Value = dDate
End If
MyCalendar.Visible = True
MyCalendar.SetFocus
End Sub
I have the same code in other apps and it works fine.
Any clues?
Thanks for the help.
text box is set to no Autocorrect. It is an unbound text
box for date, used with an ActiveX Calendar control. I
can set the calendar control value property and its
visible property in the GotFocus event of the text Box,
but when I try to use the SetFocus property on the
calendar control, I get the error.
Here's the code snippet:
Private Sub Date_In_GotFocus()
Dim dDate As Date
dDate = Now()
If Not IsNull(Date_In) Then
MyCalendar.Value = Me.Date_In.Value
Else
MyCalendar.Value = dDate
End If
MyCalendar.Visible = True
MyCalendar.SetFocus
End Sub
I have the same code in other apps and it works fine.
Any clues?
Thanks for the help.