Wher do I put the code for adding to Dates?

  • Thread starter Thread starter Emma
  • Start date Start date
E

Emma

Hello,

I want to use the following

=DateAdd("d",180,[Date Referred])

=DateAdd("d",90,[Date Referred])

=DateAdd("yyyy",1,[Date Referred]).

When I put =DateAdd("yyyy",1,[Date Referred]) in the design view of the
table under default value however I'm getting the following error message
The database engine does not recognize either the field "Date Referred" in a
validation expression, or the default value in the table 'Tbl Client
Information'.

Where do I put the code?

Thanks Emma
 
Hello,

I want to use the following

=DateAdd("d",180,[Date Referred])

=DateAdd("d",90,[Date Referred])

=DateAdd("yyyy",1,[Date Referred]).

When I put =DateAdd("yyyy",1,[Date Referred]) in the design view of the
table under default value however I'm getting the following error message
The database engine does not recognize either the field "Date Referred" in a
validation expression, or the default value in the table 'Tbl Client
Information'.

Where do I put the code?

Into the Control Source of a textbox on a Form or a Report; or, you
can create a Query based on the table and put

RenewalDate: DateAdd("yyyy", 1, [Date Referred])

into a vacant Field cell in order to calculate a year from the date
referred.

This calculated value should not be stored in your table AT ALL, since
it can be calculated on demand. The only exception would be if you
want this to be a suggested date which the user is allowed to edit to
some other date.
 
Back
Top