forms messages (field must be entered)
i've got a database block in my form based on "patients" table in my database .
- there are about three not null columns in the patients table .
- there is a button to be pressed in order to insert data in the patients table through the block .
the problem is regarding the "field must be entered" message .
when i press the button when the block is empty , the form shows that message once ,
and if i enter a number in the pat_id field , then press the button , the form shows it twice
or once on the status bar , then twice in a pop up message , which enforce me to press the ok button
to hide it .
the message is shown more than one time in some cases , and sure i do not want that to happen.
i thought of doing this ,
on-error trigger , and write null if the error code = 40202(the number of the "field must be entered message" .
right or wrong to do this ?
but sure i want a message to be shown if the user presses the button while a not null field is empty like
"please fill the empty field" . how can i do this ?
i am thinking of ,
if fieldx or fieldy or fieldz is null
then
message 'please fill the empty field'.
is this right to be done ,
i know ways to do this task , but i want to know the best way to do it ?
thanks in advance