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

auto date

ResolvedVersion 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:

Related tables

When you have related tables such as Customers and their Orders, the Customer table is the Primary table.

Open the Customers table in datasheet view and go to the Home Tab and Records group. Click on the More option and choose Subdatasheet and then click on Subdatasheet again. Now choose the related table (Orders) and click ok.

Now you can click the + symbol by each company to show the related orders.

View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.