doran_doran
Registered User.
- Local time
- Today, 14:32
- Joined
- Aug 15, 2002
- Messages
- 349
I am using following code to validate Invoice Date on my form.
Rules:
1. End user is not allow to put a date that is less than todays date.
2. Invoice date must be the 25th of a month
So, If I am entering Invoice data today (04/27/2004), and I put an Invoice date "04/20/2004", then I should get an error msg. If I put an Invoice date "04/25/2004", then I should get an error msg. If I put an Invoice date "05/14/2004", then I should get an msg that Invoice date must be 25th of a month.
I am using following code and is not working.
=========================================================
If Me.txtInvoiceDate < Now And Not IsDate(DateSerial(1, Month(25), 1)) Then
MsgBox "Invoice Date must be greater than today's date and it's 25th day of the month. ", vbExclamation, "WARNING"
End If
=========================================================
Best Regards
Dianna
Rules:
1. End user is not allow to put a date that is less than todays date.
2. Invoice date must be the 25th of a month
So, If I am entering Invoice data today (04/27/2004), and I put an Invoice date "04/20/2004", then I should get an error msg. If I put an Invoice date "04/25/2004", then I should get an error msg. If I put an Invoice date "05/14/2004", then I should get an msg that Invoice date must be 25th of a month.
I am using following code and is not working.
=========================================================
If Me.txtInvoiceDate < Now And Not IsDate(DateSerial(1, Month(25), 1)) Then
MsgBox "Invoice Date must be greater than today's date and it's 25th day of the month. ", vbExclamation, "WARNING"
End If
=========================================================
Best Regards
Dianna