Help with table automation/default value

  • Thread starter Thread starter joshuak
  • Start date Start date
J

joshuak

Guest
I made a table with a Date and Age field. If I have typed in 12/14/04 for the date and 25 for the age in the first record, how can I make Access display 12/15/04 and 26 in the next record automatically, then 12/16/04 and 27 in the next record after that and so on (as a default value for new records). I have tried the different built in date expressions, but I always get a type mismatch error. Can anyone help me with this? I am sure it's simpler than I think. Thanks.
 
Hum...

There may be better ways to do this but maybe you could just use a DMax() + 1 method...

kh
 
Thanks, but I got an invalid expression error. I am using Microsoft Access version 2002.
 
dateadd(1,d,dmax(...))
1 to add 1
d to add day (m=month, etc.)
dmax(...) what you want to add one day to.

maybe you could find the highest value in your index, and add a day to the associated date......
 

Users who are viewing this thread

Back
Top Bottom