JOIN DEVPPL

It looks like you are new here. If you want to get involved, click on Join below!



Validating Date


S

keyboard_arrow_up
0
keyboard_arrow_down


First Post Mark as Spam stahorsebozz
Posts: 2 - Registered: 2013-12-11 01:16:34

Hi

I have this code below, validating the date. so far it's just validating the date.
I'm accepting a data from the user and I want to throw error also when they put future date, be it on the month or a year, please help.

If (Mid(mskEffDate.Text, 1, 4) >= "1900" And _
Mid(mskEffDate.Text, 1, 4) <= "2100") Then
If (Mid(mskEffDate.Text, 5, 2) < "13" And _
Mid(mskEffDate.Text, 5, 2) >= "01") Then
If (Right(mskEffDate.Text, 2) < "32" And _
Right(mskEffDate.Text, 2) >= "01") Then
'Do nothing as the date is valid
Else
MsgBox "You have to enter a valid Effective Date"
End If
End If
End If






JOIN DEVPPL

It looks like you are new here. If you want to get involved, click on Join below!




MENU
Advertising