Auto generation dates in Access

Charlie100

New member
Local time
Today, 22:57
Joined
Nov 2, 2021
Messages
12
Hi

Within a form in MS access is it possible to auto generate the date based on two criteria.

I have a date say 01/01/2021 displayed in field 1
Field 2 dislays the review frequency say 6 months, 1 year, 18 months and 2 years

How would I autogenerate the field 3 value with the correct future date?

Any help would be greatly appreciated.

Charlie
 
Look at the DateAdd() function.
 
Hi Charlie. Welcome to AWF!

As Gasman said, you should be able to use DateAdd(), but you'll have to be specific about the frequency unit. It can be days or months or years; but if you have a mixed frequency, you'll have to convert them into a single frequency first. For example, 1 year and 6 months will have to use 18 months instead.
 
you bring your table in design view and add Data Macro (Before Change):
before_change.png
 
Firstly, what a brilliant community. Really pleased to have found this place.

Really appreciate the replies received - most useful. Thank you

Charlie
 

Users who are viewing this thread

Back
Top Bottom