trouble with DateAdd built-in function


M

Marcusdmc

I am trying to set up a default value for a column titled "Follow Up
Date" two months out by using the date in the column "Entry Date".
Logic tells me I should add add DateAdd("m",2,[EntryDate]) to the
Default Value section under the table design, but it's not allowing me
to save it like this. Any clues as to what I am doing wrong? Thanks!

-Marcus
 
Ad

Advertisements

A

Allen Browne

Default Value is too early for this.

Access applies the default value before you start adding the record. That's
before EntryDate has a value, so it doesn't work.

Instead, set up a form where data is entered. You can then use the
AfterUpdate event procedure of EntryDate to assign the value to FollowUp.

More info and example:
Calculated fields
at:
http://allenbrowne.com/casu-14.html
 

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