field calculated

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!
..
 
D

Douglas J. Steele

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.
 
R

R. Hicks

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
 

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