Steven,
Are you and the rest of the former soldiers and patriots on that field audit
team armed? Do you arrive by helicopter or humvee ;-)
Your not biting off more than you can chew. You've got Navy at your back it
always sends somebody else to follow the SEALS.
These dropdown formfiields that you are using have a property ".Enabeld."
You can see this by unprotecting the form, dbl-clicking one of the
Dropdowns, and looking at the field setting "Dropdown enabled." All new
fields are enabled by default. They don't have to be enabled though.
You have a situation where it would be to your tactical advantage if the
field corresponding to the question "Is the DP appointment letter on file?"
was only enabled if the answer to the question "Is a DP appointed for
suitability review?" were yes. And the only correct responses would be
"Yes" or "No"
For this discussion I have bookmarked the formfields "DPAppointed" (the
primary) and "DPAptLtr" (the follow on). When you build your form. Set the
..Enabled property for DPAptLtr to false (uncheck it)
Set the following to run OnExit from DPAppointed:
Sub DPAppointedOnExit()
If ActiveDocument.FormFields("DPAppointed").Result = "Yes" Then
ActiveDocument.FormFields("DPAppLtr").Enabled = True
ActiveDocument.FormFields("DPAppLtr").Range.Select
Else
With ActiveDocument.FormFields("DPAppLtr")
.Enabled = False
.DropDown.Value = 1
End With
End If
End Sub
You should see that when the user answers the primary question and tabs out,
the response will determine if DPAptLtr should be enabled and answered or
skipped.
You could validate the checklist when the user thinks it is finished with
something like this. To keep it simple here I just added a checkbox field
at the very end "chkValidated" and run the macro OnEntry to the checkbox.
Sub CheckAll()
Dim ffItem As Word.FormField
For Each ffItem In ActiveDocument.FormFields
If ffItem.Type = wdFieldFormDropDown And ffItem.Enabled Then
If ffItem.DropDown.Value = 1 Then
ffItem.Select
MsgBox ffItem.Name & " is incomplete. You must fill in each
ckecklist item."
ActiveDocument.FormFields("chkValidated").CheckBox.Value = False
Exit Sub
End If
End If
Next
ActiveDocument.FormFields("chkValidated").CheckBox.Value = True
End Sub
You can get a little more robust and intercept the built-in commands like
Save, SaveAs, Print and run the validations, but if your team members are
anything like the military folks that I am familiar with, they will figure
out a way to foil your best efforts. Personally I recommend you keep it
simple like something shown above and just train your team members to
validate the checklist before printing or submitting. Marines are good at
training right?
Good luck and thanks for your time on the field. Post back if you need more
help.
BTW, I won't post his name and he doesn't live just next door, but my little
corner of western NC and just down the road is also the home of one of the
longest serving Marines in history. He started at the unlawful age of 16 as
an E1 and retired a bird Colonel 43+ years later. Like your neighbor he too
is a great guy.
--
Greg Maxey
See my web site
http://gregmaxey.mvps.org
for an eclectic collection of Word Tips.
Arrogance is a weed that grows mostly on a dunghill (Arabic proverb)