I have the following code:
Private Sub ExitCheck()
On Error GoTo PROC_ERR
If Me.txtbox.Value = "Enter here" Then
Me.txtbox.SetFocus
End If
If Me.txtbox2.Value = "Enter here" Then
Me.txtbox2.SetFocus
End If
PROC_EXIT:
Exit Sub
PROC_ERR:
MsgBox Err.Description
Resume PROC_EXIT
End Sub
When the sub is called the first Me.txtbox.SetFocus does not pause for the user in enter new text. Is there a way for the first SetFocus to pause for the user to enter text without calling GoTo PROC_EXIT?
Private Sub ExitCheck()
On Error GoTo PROC_ERR
If Me.txtbox.Value = "Enter here" Then
Me.txtbox.SetFocus
End If
If Me.txtbox2.Value = "Enter here" Then
Me.txtbox2.SetFocus
End If
PROC_EXIT:
Exit Sub
PROC_ERR:
MsgBox Err.Description
Resume PROC_EXIT
End Sub
When the sub is called the first Me.txtbox.SetFocus does not pause for the user in enter new text. Is there a way for the first SetFocus to pause for the user to enter text without calling GoTo PROC_EXIT?