Validation Rule Help

S

Spencer Hutton

I am an access newbie. i need a validation rule that will limit the users
to enter only of four, two character text strings. "Fr" - "So" - "Ju" - or
"Sr". for Freshman, Sophomore, Junior or Senior. basically, i want the
user to only be able to enter one of the 4 text strings above, TIA.
 
G

Guest

Go to the table design view for the table containing the grade field.
Select the grade field > look at the bottom of the screen for the properties
of that field > next to validation rule enter "Fr" or "So" or "Ju" or "Sr".
More: to limit the user's input to 2 characters, enter 2 in the field size
property for this field.
More: to prompt the user to enter the correct text if they enter an invalid
initial, next to validation text in field properties enter something like
"Please enter one of the following: Fr, So, Ju or Sr"
Hope this helps.
Bill
 
J

John Vinson

I am an access newbie. i need a validation rule that will limit the users
to enter only of four, two character text strings. "Fr" - "So" - "Ju" - or
"Sr". for Freshman, Sophomore, Junior or Senior. basically, i want the
user to only be able to enter one of the 4 text strings above, TIA.

In addition to Bill's suggestion - you will want to use a Form to
enter data into the database; you should not use table datasheets for
this purpose. On a Form you can put a "Combo Box" (well, you can put a
combo box in a table too, but DON'T, it's a source of far more
confusion than benefit). This Combo could have a List of Values as
above; this will let the user just pick a class from the list, which
(IMHO) is better than letting them type anything and then complaining
when they don't do it right.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
G

Guest

I'm sorry I can't help below, but perhaps someone can help me.

I am new to Access. I recently designed a DB for a cancer survey. In it
were questions about demographics and so on that included validation rules
such as “0 or 1†for Gender in which 0=male and 1=female. Other questions
used Likert items with more complex rules. The trouble I am having is
getting the validation text to show up automatically somewhere in the
datasheet view so that coders can see it as they enter data. I don’t want
coders to either have to violate the validation rule or toggle back and forth
between the datasheet and design view in order to know what the rule is for
each column. So, I thought this might be done in one of 3 ways:
1. Set the DB so that each time the coder hits tab the validation text shows
up.
2. Add an item to the menu bar that displays the validation text for each
cell as the coder hits tab.
3. Allow the simultaneous display of the datasheet and design views.
Does anyone have any ideas how one of these might be done? Other ideas,
perhaps? Thanks.
 
J

John Vinson

I'm sorry I can't help below, but perhaps someone can help me.

Christopher, you have posted this message half a dozen times. The Web
interface sometimes gives a bogus error message falsely indicating
that the message was not posted - is that happening to you?

Did the three answers you've gotten so far help?

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 

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

Similar Threads


Top