Enforcement of Form Field Type

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've defined a text form field with a 'type' of 'Number'. However I can
enter any kind of garbage (text, punctuation, numbers, etc) and it is
accepted in the field if I just enter the data and then simply click
elsewhere in the form - that is, I don't hit the Tab key to advance to the
next item. (If I hit Tab, the garbage gets converted to a zero.) How can I
prevent non-numeric data from being entered into the form's supposedly
numeric fields by users who don't use the Tab key? (Word 2003)
 
Use the IsNumeric() function to test the .Result of the formfield in a macro
that runs on exit from the field.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top