Hello,
As of now, to make custom reports from XXXX Year to XXXX Year and a selected option I have VB code that changes the query to match what is entered in the year textboxes, then opens the report. I then remembered that I can set the years directly to the textboxes in the query itself.
The problem I am having is I can get the query to work for one year, and another option. But as soon as I do the Between =[Forms]![myForm]![FromYear] AND =[Forms]![myForm]![ToYear]. It won't find anything. Maybe I need to format it different if I am going to do it in the query? I was just wondering if this is possible to do (if it is, it would save me alot of time from copying and pasting and slightly changing VB code for 1 of many Reports)
Any tips would be appreciated!
Thankyou
Mike
As of now, to make custom reports from XXXX Year to XXXX Year and a selected option I have VB code that changes the query to match what is entered in the year textboxes, then opens the report. I then remembered that I can set the years directly to the textboxes in the query itself.
The problem I am having is I can get the query to work for one year, and another option. But as soon as I do the Between =[Forms]![myForm]![FromYear] AND =[Forms]![myForm]![ToYear]. It won't find anything. Maybe I need to format it different if I am going to do it in the query? I was just wondering if this is possible to do (if it is, it would save me alot of time from copying and pasting and slightly changing VB code for 1 of many Reports)
Any tips would be appreciated!
Thankyou
Mike