01-01-CurrentYear

Pedro Magueija

Registered User.
Local time
Today, 15:47
Joined
Nov 21, 2003
Messages
13
Is there a function that returns the value "01-01-CurrentYear"??
I need this value because I want my query to return all records between the begining of the year and current date. I already did this but I had to insert <Between #01-01-2004# And Date()> in the criteria of the query. What I want is to have the initial date to change years automatically.
Thanks in advance...
 
Here is one way to do it. I am using a message box just to show you how simple it is to return the current year from the PC's system clock.

Code:
MsgBox "01/01/" & Format(Date, "yyyy")
 
Try this in the criteria;

Between DateSerial (year(date()),1,1) AND Date()
 

Users who are viewing this thread

Back
Top Bottom