February 5, 2009

Create an Access form that calculates how many months a project has been underway

  • Date: September 30th, 2008
  • Author: Mary Ann Richardson

Set up a simple form that can quickly tell you how long you’ve been working on a project. Mary Ann Richardson walks through the process.


Do you need to know how long you’ve spent on a project? You can create an Access form that will answer that question for you. Follow these steps:

  1.  Click on the Form Object in the Database Window and click New. (In Access 2007, click the Create tab and then click Forms Design in the Forms group.)
  2. Click the Text Box control tool and then click and drag in the form where you want to locate the control.
  3. Click on the text box label and change the caption to Enter Project Start Date.
  4. Right-click the text box and select Properties.
  5. Click in the Name Property box and enter ProjectStart.
  6. Click the drop-down arrow of the Format property box and select cialis c20 ShortDate 6.
  7. Click the Text Box control tool and then click and drag in the form to create a second text box below the first one.
  8. Click the text box label and change the caption to Actual Work in Months, as shown in Figure A.

Figure A

  1. Right-click the second text box and select Properties.
  2. Click in the ControlSource property box and under the Data tab, click the Build button.
  3. Type the following function code as shown in Figure B:
    =DateDiff(”m”,[ProjectStart],Now())

Figure B

  1. Click OK.
  2. Close and save the form as Total Work Calculations.

When you run the form and enter a date in the ProjectDate text box, Access will automatically display the number of months from the entered date to today, as shown in Figure C.

Figure C

Permalink • Print • Comment

Leave a comment

You must be logged in to post a comment.

Made with WordPress and an easy to customize WordPress theme • Sky Gold skin by Denis de Bernardy