my bad. I read last weekend of the month.
Just check the date first to see if it is the weekend.
and then back them out.
Select Case WeekDay(dtTmp)
Case 7 ' Saturday
dtTmp = DateAdd("d", -1,dtTmp)
case 1 'Sunday
dtTmp = DateAdd("d", -2,dtTmp)
end select