Date Calculation

  • Thread starter Thread starter Cam
  • Start date Start date
C

Cam

Hello,

I have a table with a field called "CalDate"
and "NextCalDate" in Date format.
I would like to automatically calculate the NextCalDate a
year from the CalDate when the CalDate is entered.
How do I go about with the code? Thanks
 
Avi,

Where on the field (of the table)I need to put this code?
My NextCalDate is also a Date/Time field. I tried putting
in the the default value row, but it says Type mismatch.
Thanks again.
 
Where on the field (of the table)I need to put this code?
My NextCalDate is also a Date/Time field. I tried putting
in the the default value row, but it says Type mismatch.

You cannot create calculated fields at the table level. You need to use a form
and, rather than storing the resulting value, use a "calculated field", which is
merely a textbox with a "control source" something like what avi provided:

=DateAdd("yyyy",1, [CalDate])
 
Back
Top