From: LA Lawyer on 9 Apr 2010 16:53 I want to use Access 2007 VBA add a certain number of weekdays to Now(). I have found very nice sample codes which allow me to determine the number of weekdays between two dates, but I want to do the reverse, i.e., determine the day 16 WEEKdays in the future. How is that done?
From: Al Campagna on 10 Apr 2010 09:20 LA Lawyer, Given a starting date, create a loop that adds one day to that date at a time. (ex. a variable called NextDate, and a variable called Ctr) If that NextDate is a weekday... WeekDay(NextDate) = 2 or 3 or 4 or 5 or 6 then increment Ctr. Ctr = Ctr + 1 When Ctr = 16, bail out of the loop, and the current NextDate value will be your answer. -- hth Al Campagna Microsoft Access MVP 2007-2009 http://home.comcast.net/~cccsolutions/index.html "Find a job that you love... and you'll never work a day in your life." "LA Lawyer" <hkapp(a)kapplaw.com> wrote in message news:enJBtaC2KHA.556(a)TK2MSFTNGP04.phx.gbl... >I want to use Access 2007 VBA add a certain number of weekdays to Now(). > > I have found very nice sample codes which allow me to determine the number > of weekdays between two dates, but I want to do the reverse, i.e., > determine the day 16 WEEKdays in the future. > > How is that done? >
|
Pages: 1 Prev: IF ElseIf and Else Next: generate a sequence of random numbers |