This code is wrong. It does not calculate the correct
DateDue for starts on Sat or Sun. IT returns the monday
after the Friday that it is truly due. Point- An item
that is rented on Sat or Sunday and due back in 5
business days is due back on Friday. You equation would
have the return date as the following Monday. A friend
of mine is in the rental equip business and he would not
be thrilled if his invoices posted your date...
)
Nothing personal, nice equation though (from an guy with
2 engineering degrees and a masters in math)
Drew
-----Original Message-----
If you are not concerned with Holidays, then you can use:
dateadd("d",(x\5)*7+(x mod 5)-2*((weekday(dd)+(x mod
5))>=7)-((weekday(dd)+(x mod 5))=1),dd)
where dd will be your date field, and x will be 10.
To exclude holidays, you will have to use a more complex VBA function.
Bill said:
Sorry, I may not have explained correctly. DateOut can be
any day of the week, weekend or holidays. DateDue will
always be 10 business days later.
Thanks,
Bill
-----Original Message-----
If you don't worry about holidays and your DateOut field
is always Monday thru
Friday, then just add 14 days to the date.
DateAdd("d",14,DateOut)
If that won't work for you, then please post back.
Bill wrote:
I am considerably new to Access. I am working in Access
2000 and have a table called tblDates. In the table are
fields [DateOut] which will be manually entered. And
field
[DateDue] which I will need to calculate and populate
with
10 weekdays from [DateOut]. Any help auto populating the
field [DateDue] excluding weekends is greatly
appreciated.
Thanks in advance.
Bill
.
.