I have a report that gets printed out on Monday mornings. It has the days of the week already filled in for that week using Date(), Date()+1, etc. This works ok, however occasionally we need to print out the report during the week, however still need it to display the dates starting with Mon. Is there an expression (or VBA) that would evaluate the date and put in the preceding Monday's date? Thanks.
Some code I use to get the Sun and Mon dates before and after the date entered:
Sub sSQLFirstDayOfWk(datMidWk As Date, ByRef datFirstDayOfWk As Date, ByRef datLastDayOfWk As Date)
Dim intDaysBack As Integer
intDaysBack = WeekDay(datMidWk, vbMonday) - 1
datFirstDayOfWk = datMidWk
datFirstDayOfWk = DateAdd("d", -intDaysBack, datFirstDayOfWk)
datLastDayOfWk = DateAdd("d", 7, datFirstDayOfWk)