JonesP
Wed Jan 23 08:35:02 PST 2008
OK, I'll check this out. Thanks!
"Jay Freedman" wrote:
> Whether it's helpful depends on what behavior you're looking for. If you
> want to prevent the "wrong" characters from even being typed into the field,
> then form fields are the wrong tool because they can't do it. All they can
> do is let you examine the user's entry when they try to leave the field.
>
> To get more control over what can be typed in a field, you have to change to
> using a UserForm (a custom dialog). The text entry box on a UserForm has a
> Change event that fires every time the text in the box changes. You can
> write a procedure to catch that event and look at the character that was
> just typed; if it isn't valid for that box, the code can reject the
> character, and it looks to the user as if the key is 'dead'.
>
> To get a quick introduction to UserForms, see
>
http://www.word.mvps.org/FAQs/Userforms/CreateAUserForm.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.
>
> JonesP wrote:
> > Yeah, I saw this but it wasn't very helpful. Thanks anyway.
> >
> > "Jay Freedman" wrote:
> >
> >> On Sun, 20 Jan 2008 17:42:01 -0800, JonesP
> >> <JonesP@discussions.microsoft.com>
> >> wrote:
> >>
> >>> I need to create a Word form that will restrict text fields to
> >>> allow letters only; and numeric fields to allow numbers only. I'm
> >>> using Word 2003. Thanks.
> >>
> >> See
http://www.word.mvps.org/FAQs/TblsFldsFms/ValidateFFields.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.
>
>
>