warning text

A

alex

When you enter data (directly into a table or form) that violates a
validation rule, any validation text will succinctly advise the user
of the problem.

When you enter data that violates "Required" or "Allow Zero Length
String," Access provides its own (less elegant) warning.

Any way to change the warning/attention for violating "Required" or
"Allow Zero Length String"?

As always, thanks for your time!

alex
 
A

Allen Browne

You cannot customize the engine level messages in the table, but you could
use the Validation Rule and Text:

1.Set Required to No, and Allow Zero Length to Yes.

2. Set the Validation Rule for the field to:
(Not Null) AND (<> "")

3. Set the Validation Rule to whatever text you want.

In a form, you can trap the engine-level messages in the form's Error event.
 
R

Roger Carlson

In a Form (which is the ONLY place people should be entering data), you can
trap for these errors in the FormError event and replace the error message
with your own error message.

Duane Hookom created a nice utility called BR Code Stuffer for Access 97
that you can find here:
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane

It has a nice, universal routine (called "FormOnError") for trapping error
messages like this and should work with later versions as well.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
A

alex

You cannot customize the engine level messages in the table, but you could
use the Validation Rule and Text:

1.Set Required to No, and Allow Zero Length to Yes.

2. Set the Validation Rule for the field to:
(Not Null) AND (<> "")

3. Set the Validation Rule to whatever text you want.

In a form, you can trap the engine-level messages in the form's Error event.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.










- Show quoted text -

Thanks Allen; that worked well.

Another related question if you don't mind: once the data validation
error is triggered, and i press ok to accept the warning;
the cursor does not return to the field in which the error was
triggered. Any advice?

alex
 
A

Allen Browne

Strange. If you put this into the Validation Rule of the field in the table,
you should not be able to get out of the text box until you supply a
satisfactory value.

That only applies if you started to enter something though. If you don't
enter anything, the controls events and rules are not fired. Access is event
driven, so you cannot rely on values being entered in a particular order.
The user can click anywhere with the mouse, so they might even bypass the
control completely.
 
J

Jamie Collins

In a Form (which is the ONLY place people should be entering data)

Is that a safe assumption? Did you see that sig line the other day: "A
front-end is something that tries to violate a back-end"?

Jamie.

--
 

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