Unanswered: how to do Excel's =workdays(now(),-1) in Access 97
I have a form where I used to use now() default value. Just today I found out that the default value should be the previous workday. We all know that Access 97 doesn't have a Workdays function. How do I create a default value to be the previous workday?
In Excel it used to be WORKDAYS (today(), -1, HOLIDAYS)
Understood, thank you, just one clarificiation. Obviously I want to implement this procedure to show me a default value in a Text Box. Where would I write the code. Or in other words, how do I modify the code below? Thanks Jiri
Originally posted by playernovis
this reminds me when I was trying to find Calendar Software, which allows to reschedule recurrence from weekends.... only LOTUS NOTES can do it!
Public Function PreviousWorkDay(InputDate As Date) As Date
Select Case Weekday(InputDate)
intMove = -2
intMove = -3
intMove = -1
PreviousWorkDay = DateAdd("d", intMove, InputDate)
Just a thought...
I notice from that picture that you have a field in the table called 'DATE'.
I have had problems in the past with fields called Date so i give them another name, like TaskDate, ItemDate etc...
Thinking about it, that may only be a problem when working with Access and ASP pages, but it may be worth a try???