Wher do I put the code for adding to Dates?

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
 
J

John W. Vinson/MVP

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.
 

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