How do I properly set up a Default Value?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to set up the Default Value to DateAdd 180 days to a date located
in another field. I've been trying the expression:
DateAdd("d",180,[Closed])
and other similar to this, however it keeps kicking everything out. Anybody
know how to correct this?
 
As Doug points out, a default based on another field won't work, mainly
because a default is a value BEFORE there's a record -- no record, no
"other" field.

Another point to consider -- if you are already recording a date, you don't
really need to store a calculated value based on that (and some very good
reason why not to!). Besides the extra data storage (insignificant cost
these days), and the problem of keeping data synchronized between the fields
(serious issue), it is MUCH faster to calculate the later date as part of a
query than to "look it up" on a hard drive.
 
Thanks for your help!
Jeff Boyce said:
As Doug points out, a default based on another field won't work, mainly
because a default is a value BEFORE there's a record -- no record, no
"other" field.

Another point to consider -- if you are already recording a date, you don't
really need to store a calculated value based on that (and some very good
reason why not to!). Besides the extra data storage (insignificant cost
these days), and the problem of keeping data synchronized between the fields
(serious issue), it is MUCH faster to calculate the later date as part of a
query than to "look it up" on a hard drive.

--
Good luck

Jeff Boyce
<Access MVP>

tshahan said:
I am trying to set up the Default Value to DateAdd 180 days to a date located
in another field. I've been trying the expression:
DateAdd("d",180,[Closed])
and other similar to this, however it keeps kicking everything out. Anybody
know how to correct this?
 
Back
Top