Prevent empty field in form

K

kiwibirdsong

I have a form that I would like to prevent the user from leaving some fields
blank. These fields are required to enable reports to be queried so this is
rather important.

My question is: Is there a way of preventing the user from leaving the form
while the required fields are empty. I wonder if this is something I need
to do at table level or can it be done at form level

I'm learning so appreciate any help you can offer.

Kiwi
 
G

George

Hello there,

I may think of two ways to do that:
1) Set the required property of needed fields to YES
2) On the before update event on the form build a macro or using VBA, giving
you an error message if anyone of these fields are empty, e.g if field1=""
then msgbox ....
George

Ο χÏήστης "kiwibirdsong" έγγÏαψε:
 
K

kiwibirdsong

Many thanks for the help George.

Option 2 will do the trick. No to get this VB Code working properly.

Cheers
Kiwi
 
Top