Stupid Date Question

Dave_cha

Registered User.
Local time
Today, 21:19
Joined
Nov 11, 2002
Messages
119
Hi folks,

I'm getting an invalid procedure call or procedure error when I try and use the following code on form activation;

Dim Cutoff
Cutoff = 31 / 3 / DatePart(yyyy, Date)
If Date >= Cutoff Then
........
Else
........
End If

I need to test if the current date is < or > than the 31st March.

I know I'm going to kick myself when I get the solution but could someone help me with the syntax......my brain is in neutral.

Tks,

Dave :confused:
 
Code:
Dim Cutoff As Date
Cutoff = DateSerial(Year(Date), 3, 31)
If Date >= Cutoff Then
 
Thanks Mile.....appreciate the help
 

Users who are viewing this thread

Back
Top Bottom