P Paul Clark Registered User. Local time Today, 11:33 Joined Oct 30, 2011 Messages 23 Oct 30, 2011 #1 I am trying to set a criteria field to look for >#01/09/[current year]# but every combination of Date() returns invalid value. Any clues?
I am trying to set a criteria field to look for >#01/09/[current year]# but every combination of Date() returns invalid value. Any clues?
John Big Booty AWF VIP Local time Tomorrow, 06:33 Joined Aug 29, 2005 Messages 8,243 Oct 30, 2011 #2 Welcome to the Forum. You are going to need to use the DatePart() and DateSerial() functions. Your criteria will look something like; Code: ># DateSerial(DatePart(Date(),"yyyy"),9,1) #
Welcome to the Forum. You are going to need to use the DatePart() and DateSerial() functions. Your criteria will look something like; Code: ># DateSerial(DatePart(Date(),"yyyy"),9,1) #
P Paul Clark Registered User. Local time Today, 11:33 Joined Oct 30, 2011 Messages 23 Oct 31, 2011 #3 The actual format of code the did the job was: DateSerial(DatePart("yyyy",Date()),9,1) Excellent
boblarson Smeghead Local time Today, 11:33 Joined Jan 12, 2001 Messages 32,040 Nov 3, 2011 #4 I would have gone with YEAR instead of DatePart: DateSerial(Year(Date()),9,1) that is even less typing
I would have gone with YEAR instead of DatePart: DateSerial(Year(Date()),9,1) that is even less typing
John Big Booty AWF VIP Local time Tomorrow, 06:33 Joined Aug 29, 2005 Messages 8,243 Nov 3, 2011 #5 Doh, so would I, had I noticed the Year() function