Validation Text

T

topher

1. I am new to Access. Recently, I designed a DB for a cancer survey. In it
were questions with validation rules (example for the question Sex in which
0=male and 1=female: "0 Or 1"). I would like the validation text from the
design view to show up somehow in the datasheet view. For example, upon
opening the datasheet and scrolling over the column for the Sex question
above, the validation text "0=male and 1=female" would pop up WITHOUT having
to enter false data in the cell. I have not been able to figure out how to
instruct Access to do this.

2. If this is impossible, would there be a way to add a menu item that
displayed the validation text for each column as data is entered. In other
words, after tabbing to the next column, the validation text would appear on
the menubar or somewhere where it would be clearly visible to coders. Coders
need to be able to see what the rule is for each question as they enter data
without having to toggle back and forthe with design view. Any ideas?
 
B

Brendan Reynolds

Set the ControlTipText property equal to the ValidationText property ...

Private Sub Form_Open(Cancel As Integer)

Me.ProductName.ControlTipText = Me.ProductName.ValidationText

End Sub

Of course you could just copy and paste the validation text to the
ControlTip Text property in form design view, but then you'd have to
remember to update it if the validation rule changes in the future.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 

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