Can I define a "factor" data type for a field?

53 Views Asked by At

Let's say I want my table to have a column Color. The data type is Short Text. I intend this to have values like Red, Blue, and Green. However, I don't want values like Sugarplum.

In fact, I know that in this particular able, the values can only be Red, Blue, or Green - not even Yellow. So I would like the user to see an error when he tries to type in Yellow. In fact, I would like there to be drop down in each cell from which the user can select Red, Blue, or Green.

What is the simplest way of doing this?

1

There are 1 best solutions below

2
On BEST ANSWER

To restrict the values of your column, you might want to add them in a Validation Rule in the table design > propereties for that field.

You can simply use a rule like

"red" Or "green" Or "blue"

(this does allow all upper and lower case compositions of the same word, like RED, as well).

To show the possibilities in a drop down list, again go into the properties in the design view and in the lookup-tab, you can choose for 'list box' and in the Row Source Type property select 'value list'. In the Row Source property, add the colors you want.