J
Joker via AccessMonster.com
Hello Access Gurus,
I am working with Ken Getz and Mike Gilbert's date functions module. I am
using the dhPreviousWorkdayA function. I have used this function a couple of
times before with no problems. What I have is some code that calculates a
date in the future. What I need is if that date falls on a weekend just to
go back to the previous work day. Here is the code I am using for that part:
fncDueDate = Date
fncDueDate = DateSerial(Year(fncDueDate), Month([fncDueDate]), Day
(pDays) + 1)
fncDueDate = FormatDateTime(fncDueDate, vbShortDate)
DateValue (fncDueDate)
If fncDueDate = vbSaturday Or fncDueDate = vbSunday Then
DateValue (fncDueDate)
dhPreviousWorkdayA (fncDueDate)
I have tried using weekday = 1 or 7 as well.. It seems like it's ignoring the
code because it keeps landing on a Sunday.
Any help or thoughts would be greatly appreciated.
I am working with Ken Getz and Mike Gilbert's date functions module. I am
using the dhPreviousWorkdayA function. I have used this function a couple of
times before with no problems. What I have is some code that calculates a
date in the future. What I need is if that date falls on a weekend just to
go back to the previous work day. Here is the code I am using for that part:
fncDueDate = Date
fncDueDate = DateSerial(Year(fncDueDate), Month([fncDueDate]), Day
(pDays) + 1)
fncDueDate = FormatDateTime(fncDueDate, vbShortDate)
DateValue (fncDueDate)
If fncDueDate = vbSaturday Or fncDueDate = vbSunday Then
DateValue (fncDueDate)
dhPreviousWorkdayA (fncDueDate)
I have tried using weekday = 1 or 7 as well.. It seems like it's ignoring the
code because it keeps landing on a Sunday.
Any help or thoughts would be greatly appreciated.