Date forward 1 days from current date skipping weekend

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a date field on my Form which will show the next days date like this

If Today is Monday(Jan 01,2004), then my field wil show tommorrow's date(Jan 02, 2004

and if Today is Friday(Jan 05, 2004) then my field will show Monday's date (Jan 08, 2004

Can anyone help?? thanks....
 
This code does the trick:

If Weekday(MyDate, vbSunday) = vbFriday Then
MyField = DateAdd("d", 3, MyDate)
Else
MyField = DateAdd("d", 1, MyDate))
End If

Hope this helps, Graeme
 
Back
Top