G
Greg Maxey
I have a simple protected form with Text1 DropDown1 and Text2
If the user leaves Text1 empty I want to return to Text1 if the tabs or
"mouses" to DropDown1 or Text2
This is my code:
Sub OnEntry()
Dim oFFLd As Word.FormFields
Set oFFLd = ActiveDocument.FormFields
If oFFLd("Text1").Result = "" Then
oFFLd("Text1").Range.Fields(1).Result.Select
End If
End Sub
and it is set to run onentry to DropDown1 and Text2
This works as expected using the Tab key and it works if the users
mouse clicks to "Text2". However, if the user mouse clicks to
DropDown1 the user is given access of the field and the code isn't
executed until *after* the user makes a selection.
I don't want the user to be able to change the value of Dropdown1 until
they have entered text in Text1. Can this be done?
If the user leaves Text1 empty I want to return to Text1 if the tabs or
"mouses" to DropDown1 or Text2
This is my code:
Sub OnEntry()
Dim oFFLd As Word.FormFields
Set oFFLd = ActiveDocument.FormFields
If oFFLd("Text1").Result = "" Then
oFFLd("Text1").Range.Fields(1).Result.Select
End If
End Sub
and it is set to run onentry to DropDown1 and Text2
This works as expected using the Tab key and it works if the users
mouse clicks to "Text2". However, if the user mouse clicks to
DropDown1 the user is given access of the field and the code isn't
executed until *after* the user makes a selection.
I don't want the user to be able to change the value of Dropdown1 until
they have entered text in Text1. Can this be done?