S
spunkymuffmonkey
Hi,
Could somebody please help me by explaining the best solution to my problem,
which is:
I would like to make a particular formfield mandatory, the formfield is a
picklist and is half way through my document, the default text is "--Please
Select--" and there are five other entries within the picklist:
Substantiated
Partly Substantiated
Not Substantiated
Not Determined/Inconclusive
No Further Action
I envisaged it working by employing the following code as an exit macro:
Sub MandatoryField()
Dim strOutcome As String
strOutcome = ActiveDocument.FormFields("CaseConclusion").Result
Do While strOutcome = "--Please Select--"
MsgBox "Please ensure that you have selected a Case Conclusion from the
options in the picklist.", vbCritical, "No Option Selected"
ActiveDocument.FormFields("CaseConclusion").Select
Loop
End Sub
Although the validation text does appear when --Please Select-- is selected
I am allowed to move to the next formfield without looping.
If anybody could give me a clue as to where I am going wrong I would be
extremely grateful.
Thanks for looking.
Could somebody please help me by explaining the best solution to my problem,
which is:
I would like to make a particular formfield mandatory, the formfield is a
picklist and is half way through my document, the default text is "--Please
Select--" and there are five other entries within the picklist:
Substantiated
Partly Substantiated
Not Substantiated
Not Determined/Inconclusive
No Further Action
I envisaged it working by employing the following code as an exit macro:
Sub MandatoryField()
Dim strOutcome As String
strOutcome = ActiveDocument.FormFields("CaseConclusion").Result
Do While strOutcome = "--Please Select--"
MsgBox "Please ensure that you have selected a Case Conclusion from the
options in the picklist.", vbCritical, "No Option Selected"
ActiveDocument.FormFields("CaseConclusion").Select
Loop
End Sub
Although the validation text does appear when --Please Select-- is selected
I am allowed to move to the next formfield without looping.
If anybody could give me a clue as to where I am going wrong I would be
extremely grateful.
Thanks for looking.