Re: Form Fields

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Graham Mayor (gmayor_at_NOSPAMmvps.org)
Date: 04/01/04


Date: Thu, 1 Apr 2004 16:24:06 +0100

Johann Swart wrote:
> I am new to Word Forms, so please bear with me.
> 1) One particular field has to have three digits, e.g. 005, 010, 980,
> etc. Often users omit the leading zeros. Is there anything I can do to
> enforce three digits? For example, when the user enter '1', on leaving
> the field, it should read '001'. Alternatively, can one invoke a
> message telling the user to enter three digits?

You can do either - but setting the field properties type to number and the
number format to 000 will insert the leading zero(s) when omitted. You can
put a help message in the properties that will print in the Word status bar
at the bottom of the screen, and you can draw users attention to this by
popping up a message from an autonew macro in the document template
eg

MsgBox "Refer to the status bar at the bottom of the screen for
instructions"

> 2) How can I inhibit the Enter key, e.g. inside a field of limited
> characters as the one mentioned above. I have specified three digits,
> but I can nevertheless hit the Enter key ad infinitum, which obviously
> completely distorts the form. Alternatively, can one make the Enter
> key behave like the tab key in this particular field?

You can't :( You can put the field in an unbordered table cell of fixed
dimensions which will thus not grow if the enter key is pressed and the user
will see something is amiss.

> 3) In another field I have a two-part question; the answer is either a
> date in the future, or a predefined condition in the future. I would
> like the user to select either date or condition, and then have the
> field where the information is entered , change accordingly; either a
> defined date format, or a condition selected from a drop-down list. Is
> this possible, and how?

Use a drop down form field - or is there something you are not telling us?

-- 
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
     Graham Mayor -  Word MVP
   Web site www.gmayor.com
  Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>


Relevant Pages

  • Re: Form Fields
    ... Word MVP web site http://word.mvps.org ... another form field) that it becomes complex. ... {REF RepCode} instead of just RepCode). ...
    (microsoft.public.word.docmanagement)
  • Re: macro to enter data and print doc
    ... the MVP web site (link in sig. ... Word MVP web site http://word.mvps.org ... > well but I am having problems getting the "form field" to work ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Cross reference book marks are changing format, why is this ha
    ... Graham Mayor - Word MVP ... Word MVP web site http://word.mvps.org ... Ex) Mr. Mike Jones PHD is the form field text. ...
    (microsoft.public.word.docmanagement)
  • Re: Repeating Macro
    ... Graham Mayor - Word MVP ... Word MVP web site http://word.mvps.org ... have a form field and will only take note of the first form field in ...
    (microsoft.public.word.vba.general)
  • Re: Is a form, template, or table best (when used by multiple user
    ... Tab will take you from one form field to the next. ... Word MVP FAQ site: http://word.mvps.org ... Does anyone know how to tab or know what the command is to tab from one ... Word MVP web site http://word.mvps.org ...
    (microsoft.public.word.docmanagement)