After I click on the date I want in the Calendar control, the focus moves to the first data input field on my form.
The form is setup with a Start Date textbox followed by a End Date textbox. Both have a Calendar Control attached and I'd like to have the behavior where the focus goes to the End Date text box after the user clicks a date in the Start Calendar control.
I'm using the following coding:
Private Sub TaskStart_LostFocus()
ocxWAStart.Visible = False
End Sub
Private Sub ocxWAStart_KeyPress(KeyAscii As Integer)
TaskStart.Value = ocxWAStart.Value
ocxWAStart.Visible = False
ocxWAFin.SetFocus
End Sub
I don't understand why the ocxWAFin.SetFocus is not working. I'm overlooking something. Any ideas?
The form is setup with a Start Date textbox followed by a End Date textbox. Both have a Calendar Control attached and I'd like to have the behavior where the focus goes to the End Date text box after the user clicks a date in the Start Calendar control.
I'm using the following coding:
Private Sub TaskStart_LostFocus()
ocxWAStart.Visible = False
End Sub
Private Sub ocxWAStart_KeyPress(KeyAscii As Integer)
TaskStart.Value = ocxWAStart.Value
ocxWAStart.Visible = False
ocxWAFin.SetFocus
End Sub
I don't understand why the ocxWAFin.SetFocus is not working. I'm overlooking something. Any ideas?