I am creating a data entry form with required fields. I have set data entry code in the "On Exit" as follows:
Private Sub responsible_Exit(Cancel As Integer)
If IsNull(Me.responsible) = True Then
MsgBox "Click on Responsible level."
Me.responsible.SetFocus
End If
End Sub
The problem is that the SetFocus is placing the focus on the next field instead of the referenced field. Any suggestions? I was thinking to add code after the SetFocus line to force the cursor to move to the next field, but am not sure how to write it.
Private Sub responsible_Exit(Cancel As Integer)
If IsNull(Me.responsible) = True Then
MsgBox "Click on Responsible level."
Me.responsible.SetFocus
End If
End Sub
The problem is that the SetFocus is placing the focus on the next field instead of the referenced field. Any suggestions? I was thinking to add code after the SetFocus line to force the cursor to move to the next field, but am not sure how to write it.