Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
chas9 chas9 is offline
external usenet poster
 
Posts: 3
Default How do I set up mandatory form fields in Word 2003

I have developed a form for a number of people to use. The form includes drop
down boxes with F1 help provision. I want to have all fields completed before
someone can move onto the next one (regardless if there is a drop down box or
not - if that's possible). I understand there is the ability to use mandatory
form fields with a macro on exit if a form is not filled in. How do I do
this. I am a novice with macros therefore would appreciate a step by step
process. Thanks in anticipation.
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default How do I set up mandatory form fields in Word 2003

The general method of validating the contents of a form field is shown
at http://www.word.mvps.org/FAQs/TblsFl...ateFFields.htm. You
can copy the code from that page and make a couple of small changes to
get the behavior you want.

The example in that page is for the contrived condition that the
contents of the field must start with the letters 'KLM'. If you want
to prevent the user from exiting the field if it's empty, replace the
line

If Len(.Result) 0 And Left$(.Result, 3) "KLM" Then

with the line

If Len(Trim(.Result)) = 0 Then

and change the MsgBox message appropriately.

The other change is to replace "Text2" with the actual name of the
field being validated, in two places in the code. The field's name is
the Bookmark item in the field's Properties dialog. In the code, the
name must be enclosed in double quotes.

The steps for taking a macro from a post or web page are given in
http://www.gmayor.com/installing_macro.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Thu, 26 Jul 2007 18:04:00 -0700, chas9
wrote:

I have developed a form for a number of people to use. The form includes drop
down boxes with F1 help provision. I want to have all fields completed before
someone can move onto the next one (regardless if there is a drop down box or
not - if that's possible). I understand there is the ability to use mandatory
form fields with a macro on exit if a form is not filled in. How do I do
this. I am a novice with macros therefore would appreciate a step by step
process. Thanks in anticipation.

  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default How do I set up mandatory form fields in Word 2003

See also http://www.gmayor.com/formfieldmacros.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Jay Freedman wrote:
The general method of validating the contents of a form field is shown
at http://www.word.mvps.org/FAQs/TblsFl...ateFFields.htm. You
can copy the code from that page and make a couple of small changes to
get the behavior you want.

The example in that page is for the contrived condition that the
contents of the field must start with the letters 'KLM'. If you want
to prevent the user from exiting the field if it's empty, replace the
line

If Len(.Result) 0 And Left$(.Result, 3) "KLM" Then

with the line

If Len(Trim(.Result)) = 0 Then

and change the MsgBox message appropriately.

The other change is to replace "Text2" with the actual name of the
field being validated, in two places in the code. The field's name is
the Bookmark item in the field's Properties dialog. In the code, the
name must be enclosed in double quotes.

The steps for taking a macro from a post or web page are given in
http://www.gmayor.com/installing_macro.htm.


I have developed a form for a number of people to use. The form
includes drop down boxes with F1 help provision. I want to have all
fields completed before someone can move onto the next one
(regardless if there is a drop down box or not - if that's
possible). I understand there is the ability to use mandatory form
fields with a macro on exit if a form is not filled in. How do I do
this. I am a novice with macros therefore would appreciate a step by
step process. Thanks in anticipation.



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
In a form, how do I make a field mandatory b/4 proceeding to next wonderer Microsoft Word Help 1 August 29th 06 03:53 PM
mandatory fill-in fields in MS Word deb Microsoft Word Help 2 August 18th 06 02:35 PM
how do I set up mandatory 'fillin' fields in word Lori Microsoft Word Help 0 September 20th 05 10:15 PM
Mandatory fields to be filled out by staff (not mail-merge) Remco Sijmons via OfficeKB.com Mailmerge 1 May 27th 05 09:14 PM
Creating mandatory fields in a Form Wes Microsoft Word Help 4 January 21st 05 10:27 PM


All times are GMT +1. The time now is 09:41 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"