Default Value

D

Dine Lene

In the primary table, I have an "ApproveDate" field, the next field
(ReportDate), I want a default value to be 6 months from ApproveDate. What
is the expression for this?
 
W

Wayne-I-M

Hi

Your would be best off deleting the Report Date from the table and just
create a query based on your table. You can have a calculted field in the
query to display your 6 months in advance date

SELECT DateAdd("m",6,[TableName]![ApprovedDate]) AS ReportDate,
FROM TableName;
 
J

Jeff Boyce

Are you attempting to do that because you expect EVERY [ReportDate] to be 6
months after [ApproveDate], or is it possible that you'd have a [ReportDate]
that was NOT 6 months later?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
R

Ron2006

Some thouths for 6 month's from now:

Whether you save it as a separate field or simply use the 6 month add
routine, don't forget that you will most probably need to ALWAYS do a
range search on the report date for your report.

Today is Thursday. But 6 months from now might NOT be a normal work
day or it might end up on a Holiday. What date will you get adding 6
months to Dec 31st? During a leap year? During a non-leap year?

Ron
 

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