Ok, So I am Tracking certain Items by region of the world and I have create a system of Tables and Join Query's to a report. The Report summarizes all the data for 2012, it has a sub report inside the main report for each region of the world. When 2013 is done I want to be able to copy the exact report and just change the control sources for the report and sub reports, as all the queries and tables that will be built in 2013 have the same fields so the data should transfer easily. Now lets say I want it so this is user friendly, is there a way that I can use Vba code to generate the next report and change the control sources based on what a user selects in a Form? As this would allow a person not familiar with access to generate reports with ease. Thanks in advance.
1 Answers
If you are as good as I think you are, the 2012 report (and I am including sub-reports) uses queries that filter records by date -- limiting the returns to the year 2012. For 2013, you will run the same report, but the criterion for filtering will be the year 2013. This is easily handled with parameter queries, and VBA will indeed make it simple.
If you can show us a bit more, such as one of the base queries, then you hopefully can learn more about the specific approach.
Additional Information:
A good how-to is available here. I believe it's not too hard, using parameter queries and VBA (or VBA's QueryDef object), to simplify the user's action to just choosing from a list of years on a form. If you get a start on this approach, post what you have and maybe I can offer more help. (Sorry for the long time replying.)