If you *do* require the ability to enter enter dates from the 5th of the
current month or EARLIER (i.e. any date before the 5th of the current month,
including dates from previous months) this will do it:
Private Sub txtSomeDate_BeforeUpdate(Cancel As Integer)
If Not IsDate(Me.txtSomeDate) Then
MsgBox "Invalid Date Entered", vbExclamation
Cancel = True
ElseIf Me.txtSomeDate > DateSerial(Year(Date), Month(Date), 5) Then
MsgBox "Must be on or before the 5th of the current month",
vbExclamation
Cancel = True
End If
End Sub
Just had a stray thought (they come so seldom, I like to nuture them!) Do
your requirements need the entered date to be the 1st thru 5th of the current
month, or can a valid date be any day of any previous month as well?
--
There's ALWAYS more than one way to skin a cat!
Answers/posts based on Access 2000
Message posted via AccessMonster.com