G
Guest
Why won't this work right. I have a data entry screen where the user enters
a date. The date range that should be entered is 10/1/2002 to 9/30/2005. I
have the following code in as:
Dim TextDate As Date
TextDate = DateSerial(Right(Me!INDPTDOS.Value, 4), _
Left(Me!INDPTDOS.Value, 2), _
Mid(Me!INDPTDOS.Value, 3, 2))
Select Case TextDate
Case Is < #10/1/2002#
' do nothing
Case Is > #9/30/2005#
' do nothing
Case Else
MsgBox "You have entered an invalid date."
Cancel = True
End Select
This will still enter dates such as 9/25/2000 and any date over 10/1/2005
which I DO NOT WANT TO HAPPENed. How can I get it so that the user will not
enter any dates except those in this range 10/1/2002 to 9/30/2005?
a date. The date range that should be entered is 10/1/2002 to 9/30/2005. I
have the following code in as:
Dim TextDate As Date
TextDate = DateSerial(Right(Me!INDPTDOS.Value, 4), _
Left(Me!INDPTDOS.Value, 2), _
Mid(Me!INDPTDOS.Value, 3, 2))
Select Case TextDate
Case Is < #10/1/2002#
' do nothing
Case Is > #9/30/2005#
' do nothing
Case Else
MsgBox "You have entered an invalid date."
Cancel = True
End Select
This will still enter dates such as 9/25/2000 and any date over 10/1/2005
which I DO NOT WANT TO HAPPENed. How can I get it so that the user will not
enter any dates except those in this range 10/1/2002 to 9/30/2005?