I am attempting to force a user to put in a date in a control using the following code.
Private Sub txtRDate_Exit(Cancel As Integer)
If IsNull(Me.txtRDate) Then
MsgBox " Must have a Date to continue "
' Me.txtRDate.Enabled = True
Me.txtRDate.SetFocus
End If
End Sub
When I get the Message Box and select okay, it advances to the next field. How can i get it to go back to txtRDate? The setfocus seems to have no affect. I've tried it with the .enabled and without.
Thanks in advance!!
Jerry
Private Sub txtRDate_Exit(Cancel As Integer)
If IsNull(Me.txtRDate) Then
MsgBox " Must have a Date to continue "
' Me.txtRDate.Enabled = True
Me.txtRDate.SetFocus
End If
End Sub
When I get the Message Box and select okay, it advances to the next field. How can i get it to go back to txtRDate? The setfocus seems to have no affect. I've tried it with the .enabled and without.
Thanks in advance!!
Jerry