S
Shawn
I am creating “msgbox†that tell user billing due on end of month
(workingday) when they click on cmd button
I had it work last day of the month but I having a problem to get last
business day of the month. I am using Access 2003. I will appreciate any
help on this.
Here is the code
Dim MyDate As String
Dim Eomday, dtLast
MyDate = Date
Eomday = DateSerial(Year(Date), Month(Date) + 1, 0)
If Weekday(Eomday, vbSaturday) Or Weekday(Eomday, vbSunday) Then
dtLast = Eomday - (Weekday(Eomday, vbSunday) - 6)
End If
If MyDate > Eomday Then
MsgBox "MONTHLY BILLING NOT DUE Till " & Chr(13) & [dtLast],
vbInformation, "Monthly Billing"
Exit Sub
End If
(workingday) when they click on cmd button
I had it work last day of the month but I having a problem to get last
business day of the month. I am using Access 2003. I will appreciate any
help on this.
Here is the code
Dim MyDate As String
Dim Eomday, dtLast
MyDate = Date
Eomday = DateSerial(Year(Date), Month(Date) + 1, 0)
If Weekday(Eomday, vbSaturday) Or Weekday(Eomday, vbSunday) Then
dtLast = Eomday - (Weekday(Eomday, vbSunday) - 6)
End If
If MyDate > Eomday Then
MsgBox "MONTHLY BILLING NOT DUE Till " & Chr(13) & [dtLast],
vbInformation, "Monthly Billing"
Exit Sub
End If