Make date 13 days after anoth date

scottappleford

Registered User.
Local time
Today, 10:16
Joined
Dec 10, 2002
Messages
134
Hi

I have two date fields.

I would like to lock the second one and make it reliant on the first one e.g. plus 13 days.

Can someone explain how i do this?

Thanks
 
the second fields needs to be calculated on the fly, not stored.
=dateadd("d",13,[MyFirstDate])

HTH

Peter
 
Another way to do it is to enter in the control source
of your second field:

=[firstfieldName]+13

(You can type the above directly on the textbox, if you wish)

The value of your second field will automtically recompute
after the value of the first field changes.
 
To Calrify

Hi

thanks for your help on this. Will i lose the use of the table, as i still need to have this in the table as searchses are done by the period?

If, so the user will just have to use a pop up calendar and make sure the date is correct.

If so maybe you could let me know how to enter a vaildation rule to ensure it equals +13 days from start date?

Thanks
 
You dont need to store the date as you can always create it from the given date when you do searches.

You could validate it at form level but you will need to trap changes to the first date as well or the data could soon get out of step, that is why it is best doing it on the fly, it's always right.

Peter
 
Thanks

Hi

Thanks for the advice - great help - i see what you mean now.

Still in the learning stages of access but really enjoying it and everyone on here has been a great help.
 
Acces is Fun, as long as you keep taking the tablets :)

Peter
 

Users who are viewing this thread

Back
Top Bottom