VALIDATION RULE

A

angie

i have created a table including the following fields:

activation date and expiration date. i want to create a validation rule for
the expiration date that allows me to enter data relative to the activation
date.

e.g. if activation is 30/06/2005 the expiration should be one year later
30/06/2006, no other data should be entered.

can i achieve that when i create the table or do i have to create a query?
if yes which function should i use and how?

thank you in advance!
 
A

Allen Browne

If the Expiration must always be exactly 12 months after the activation,
then you must not store an Activation field in your table.

Instead, create a query that uses your table, and type this into the Field
row:
Expiration: DateAdd("yyyy", 1, [Activation])

The date can never be wrong, and you can use the query anywhere you can use
the table.

More info:
Calculated fields
at:
http://allenbrowne.com/casu-14.html
 

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