How can i change the message that appears ???

K

Kimon

My question is..
How can i change/or disable the message that appears when a field in a form
has its property required = true ?
(When the user update/add a record and this field is null or zerowidth a
message appears from the access)
 
S

Steve Schapel

Kimon,

In design view of the table, set the Required property back to No, and
set the Validation Rule property to...
Is Not Null
Then you can enter whatever you like in the Validation Text property.

Only other way to do it is use VBA procedure on the Before Update event
of your forms to check the validity of the data entered, and display
your custom messages if not.
 
K

Kimon

I did it but when i add in the subform (continuos form) a record whithout to
fill the rest fields (required), i focus (click) the previous record and
nothing happens. The new record that i added has empty fields.
 
S

Steve Schapel

Kimon,

Can I just check here:
- You have a field where the Validation Rule property in table design
is set to Is Not Null
- You enter a new record on the form, and leave this field empty
- There is no error message when you leave the record?

If so, I cannot understand why this would happen.
 
K

Kimon

I check it again it works but there is a bug.
One of the fields in the record is a drop list and it does not work property.
When the user has focus it and then lostfocus from this field without to
fill it, the first time it displays the message that i wrote in the
validatioin text(is not null).
If the user focus it for second time and lostfocus again from the same field
whithout to choose somenthing from the drop list then an other message
appears from the access.

That means that your suggestion is ok for the first time that the user leave
this field whithout to fill it.
But the second time when the user focus the same field in the same record
there is problem because the access displays an other message.
 
S

Steve Schapel

Kimon,
That means that your suggestion is ok for the first time that the user leave
this field whithout to fill it.

Normally the Validation Rule would only be applied if you do anything
that would cause the record to be saved. For example, close the form,
or move to another record, or an event that has mnacro or code that
forces a save of the record. It normally would not be applied when you
leave the field (unless the Exit or LostFocus event has code to force a
save).
But the second time when the user focus the same field in the same record
there is problem because the access displays an other message.

So, what is the "other message"? And do I read correctly that it is
when the focus goes *to* the combobox the second time?
 
Top