Concatenating a date not working

makewise

New member
Local time
Today, 13:37
Joined
Mar 21, 2007
Messages
4
I am using this as a criteria for a Query that is pulling the 2 dates from a form - Report Date Range.
The reason I am trying to do this is I have a cumulative report that needs to run for the fiscal year (1/1/xx to 12/31/xx). It will always use 1/1/xx as the base date for the range. I am trying to pick up the year because it will change depending on the periods/years picked.

Between #1/1/ & Year ([Forms]![frmReportDateRange]![txtBeginningDate]) & # And [Forms]![frmReportDateRange]![txtEndDate]

When I run the query I get "The expression you entered has an invalid date value."
I am trying to concatenate the 1/1/ with the year and obviously that is not working. Any ideas?

Thanks in advance!
 
Try using the DateSerial Function function for the first part.
 
Well, I tried using DateSerial and could not get it to work, but you sent me in the right direction! I used:
Between DateValue("1/1/" & Year([Forms]![frmReportDateRange]![txtBeginDate])) And [Forms]![frmReportDateRange]![txtEndDate]

And it worked. (IT alos helped that I fixed a field name that was wrong too, duh!)

Thanks!
 

Users who are viewing this thread

Back
Top Bottom