igendreau wrote:
I have users inputting a "Request Date". Upon entering a date, I need
Access to populate a second field ("Due Date"). When they enter their
Request Date, I want Access to set the default value of Due Date =
Request Date + 9 Business Days (Holidays don't matter. Just want
Saturday and Sunday taken out). Any thoughts?
Assuming [Request Date] is on a business day, add two weeks, i.e., 10
business days. Then subtract one day unless that day is a Monday where
three days are subtracted. Note that adding 14 days does not change
the Weekday value.
DateAdd('d', IIf(Weekday([Request Date]) <> 2, -1, -3), DateAdd('d',
14, [Request Date]))
If [Request Date] can fall on a weekend, Saturdays subtract two days
and Sundays subtract three days.
DateAdd('d', IIf(Weekday([Request Date]) < 3, -3, IIf(Weekday([Request
Date]) = 7, -2, -1)), DateAdd('d', 14, [Request Date]))
Post back if you need something more general or something elegant.
James A. Fortune
CM********@FortuneJames.com