I am having trouble with a query that is used for retreiving Year to Date information for a report. The user enters in date range information in Forms!RunReport. This form contains three unbound text boxes: txtyear, txtstart, txtend. This date information is used to run the report. In qryYTD the date criteria is: Between #2004-01-01# And Forms!RunReport!txtEnd This does work except every year the criteria will need to be manually changed.
I would like to have the query run the YTD query based on the year in txtyear. I have tried the following criteria: Between "1/1" & Year(Forms!RunReport!txtYear) And Forms!RunReport!txtEnd
This does not seem to work. I don't know if it will make a difference but the db is set up with date inputs in a yyyy-mm-dd format. I would appricate the help if anyone would know how to run the query based on the year the user inputs.
Thanks,
-Jeremy
I would like to have the query run the YTD query based on the year in txtyear. I have tried the following criteria: Between "1/1" & Year(Forms!RunReport!txtYear) And Forms!RunReport!txtEnd
This does not seem to work. I don't know if it will make a difference but the db is set up with date inputs in a yyyy-mm-dd format. I would appricate the help if anyone would know how to run the query based on the year the user inputs.
Thanks,
-Jeremy