Results 1 to 2 of 2
Thread: Form field help in Word (2003)
2007-01-19, 17:53 #1
- Join Date
- Oct 2002
- New Salem, North Dakota, USA
- Thanked 0 Times in 0 Posts
Form field help in Word (2003)
We have a document with a number of text and checkbox form fields, some of which need are required to have information. Is there a way in Word to make sure that they need to populate these fields without just leaving them blank. I would like to check the value when they move to the next field, if it is blank a message box should pop up telling them that a null value is not acceptable.
2007-01-19, 18:43 #2
- Join Date
- Mar 2002
- Thanked 28 Times in 28 Posts
Re: Form field help in Word (2003)
Say that you want to require the form field whose bookmark name is FirstName to be filled in.
Create the following macro in a standard module:
If ActiveDocument.FormFields("FirstName").Result = "" Then
MsgBox "Please enter your first name!", vbCritical
While the document is unprotected, double click the form field that comes after the FirstName one.
Select CheckFirstName in the (Run macro on) Entry dropdown.
The user will still be able to click in other form field than the one after it. If you want to prevent that, you'll have to set the macro for those too.