Form Field Validation

B

bmatson

I have a form I am working on that has several Form Fields in it. I have used
a macro to validate the fields to prevent the user from leaving any field
blank. I have the cursor start at the first field on the form so they are
required to fill in that field before moving on to the next field. If you try
to tab to the next field while the first one is blank, the macro kicks in and
does not let you do it. The problem is that the user is able to click away
from the field with their mouse to any other part of the form, whether or not
the fields are blank. Does anyone know how to fix this problem? Do I need to
do another macro?
 
C

Cindy M.

You unfortunately don't mention the version of Word involved?

In some versions of Word, the OnEnter macros don't kick in when the mouse is
used. There's absolutely nothing you can do about that.

As an alternative, you could consider displaying a Userform when the document
starts up, and enforce the data entry in that. It can write to the document at
the same time so that the user can see what's what.
I have a form I am working on that has several Form Fields in it. I have used
a macro to validate the fields to prevent the user from leaving any field
blank. I have the cursor start at the first field on the form so they are
required to fill in that field before moving on to the next field. If you try
to tab to the next field while the first one is blank, the macro kicks in and
does not let you do it. The problem is that the user is able to click away
from the field with their mouse to any other part of the form, whether or not
the fields are blank. Does anyone know how to fix this problem? Do I need to
do another macro?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

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

Top