field calculated

  • Thread starter Thread starter vincent
  • Start date Start date
V

vincent

I would like to define a fiel that get galculated form an
other field.
Both field are dates. The second is calculated base on
the first. It should be 3 weekdays prior to the first.

so if the first is today Monday, Novembre 17 2003, the
second should calculat has Novembre 12 2003.

in the field definition I have try various combination
such has =DateAdd(-3,"w","First Date")in the Default value

Suggestion!
..
 
The syntax for DateAdd is:

DateAdd(interval, number, date)

where interval is a string expression that is the interval of time you want
to add, number is a numeric expression that is the number of intervals you
want to add and date is a variant (Date) or literal representing date to
which the interval is added, so you should have used =DateAdd("w", -3,
[First Date]). However, while "w" says it represents weekdays, it doesn't
really: it just represents days (in other words, it includes weekends).

Check out the Date/Time section of "The Access Web"
http://www.mvps.org/access/ for a couple of suggestions of how to skip
weekends and holidays.
 
What you ask violate the First Normal Form (1NF).

You should not store the calculate result in your table.
You simply calculate the result "dynamically" when the value i
needed.

RD
 
Back
Top