P
Peter
I have a form with a text field that requires input. I assigned the following
macro to the ExitMacro property:
Public Sub Text1_Exit()
With ActiveDocument.FormFields("Text1")
If .Result = "" Then
MsgBox "You must enter a value.", vbCritical + vbOKOnly
.Select
End If
End With
End Sub
If I tab through this field, I get the expected message box but, the cursor
moves to the next field anyway. I want the Text1 field to be reselected and
the user not allowed to move to the next field until they have made an entry.
What am I doing wrong?
Thanks,
Peter
macro to the ExitMacro property:
Public Sub Text1_Exit()
With ActiveDocument.FormFields("Text1")
If .Result = "" Then
MsgBox "You must enter a value.", vbCritical + vbOKOnly
.Select
End If
End With
End Sub
If I tab through this field, I get the expected message box but, the cursor
moves to the next field anyway. I want the Text1 field to be reselected and
the user not allowed to move to the next field until they have made an entry.
What am I doing wrong?
Thanks,
Peter