Sara Overton
Registered User.
- Local time
- Today, 09:27
- Joined
- May 22, 2001
- Messages
- 34
I've set up coding to recognise a date.
What I need to do is alert the user if the date is older than 35 days or more.
It then asks the user to input another date (input box with a declared variable), if this is stil 35 days or more then it won't let them go any further.
The problem I've got is it only alerts if 35 days, if 36 it doesn't do anything.
The relevant section of code reads:
Dim strinput As String
Dim strinput2 As Date
If [Invoice_Date] < DateAdd("d", -35, Date) Then
strinput2 = InputBox("This invoice is more than 35 days old, what date is stamped on the invoice?")
If strinput2 < DateAdd("d", -35, Date) Then..............
Any ideas where I'm going wrong? I think it may be the code:
< DateAdd("d", -35, Date)
What I need to do is alert the user if the date is older than 35 days or more.
It then asks the user to input another date (input box with a declared variable), if this is stil 35 days or more then it won't let them go any further.
The problem I've got is it only alerts if 35 days, if 36 it doesn't do anything.
The relevant section of code reads:
Dim strinput As String
Dim strinput2 As Date
If [Invoice_Date] < DateAdd("d", -35, Date) Then
strinput2 = InputBox("This invoice is more than 35 days old, what date is stamped on the invoice?")
If strinput2 < DateAdd("d", -35, Date) Then..............
Any ideas where I'm going wrong? I think it may be the code:
< DateAdd("d", -35, Date)