Data Integrtiy

M

Mrakulis

I need to limit people form entering data outside a range that has been set.
but i need it to check that range from a table or form. How do i do so?
 
A

Allen Browne

Open the table in design view.
Select the date/time field you wish to limit.
In the lower pane, beside the Validation Rule, enter something like this:
Between #1/1/1900# And #1/1/2100#
 
M

Mrakulis

The Values i am entering are int values. and instead of putting values into
the validation rule, i Would like it to check values in other table. eg
between field_A and field_B. But it doesn't allow me to look up from table
view. Pls help
 
A

Allen Browne

In the context of a form, you can use the BeforeUpdate event of the Form to
test whether the value is in range.

That won't work in other contexts though (e.g. entering directly into a
table, or using an Append query.)
 
M

Mrakulis

Allen. Do you mind giving mw your e-mail so i can send you an example of what
i am trying to do? pls
 
A

Allen Browne

Hope you understand we cannot accept databases from everyone and do your
debugging for you.

Your choices are:
a) Use table-level validation:
- Advantage: works in every context
- Disadvantage: not flexible enough for lookups

b) Use form-level validation:
- Advantage: powerful and programmable
- Disadvantage: does not apply in other contexts.
 
Top