How do I add a DateAdd fucntion to an existing table?

D

Donna

I have an existing calibration table in access. There is a date cal'd, the
cal cycle, and the due date. i would like to have the due date automatically
calculated. How do I go about using the DateAdd function to do this?

Thank you in advance!
 
K

Klatuu

You can't do calculations in a table and you shouldn't store calculated
values in a table. If you need to calculate and display a due date on a
form, in a query, or on a report, you do the calculation there. For reports
and forms, use a text box with the calucation in it. For example, the due
date is one month from the LastCalDate field in your table that is bound to
a control named txtLastCalDate

=DateAdd("m", 1, txtLastCalDate)

In a query, you would create a calculated field

SELECT DateAdd("m", 1, [LastCalDate]) AS DueDate
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top