auto date

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Access Training and help » Auto date

Auto date

resolvedResolved · Urgent Priority · Version 2003

Adam has attended:
Access Introduction course
Access Intermediate course

Auto date

I am working on a project which requires an issue date and a review date.
Currently the user would have to input both dates manually, but since they could easily make a mistake, and as the review date is always 2 years after the issue date is there a formula I can use to allow access to do this automatically.

Here is an example how the date is set up on the form:


Issue Date: 28/08/2008
Review Date: 28/08/2010

your help is much appreciated.

RE: Auto date

Hi Adam

Thank you for your question

I am assuming that you are entering data through a form. If this is the case then you can attatch a dateadd function as the default value of the review date text box.

Bring your form up in design view and select the text box that displays the review date. Then open the properties dialog and go to the data tab

In the Default property type the following


=DateAdd("yyyy",2,[IssueDate])

This is the date add function

yyyy specifies that you are adding years to the date
2 specifies the number of years
[Issue Date] is the field that you are increasing

Hope this helps

Regards

Stephen


 

Access tip:

Design View in Relationship window

Your in the Relationship window and changes are required to be made to a Table's design.

Rather than exiting the Relationship window, if you perform a right-mouse click on the table, it opens that table up in Design view

View all Access hints and tips


Server loaded in 0.09 secs.