I need to run a report based on the selected year on the form. I have 5 tables with different years worth of data; (I know this is a bad idea but this is what my manager wants)
tblYear2011
tblYear2012
tblYear2013
tblYear2014
tblYear2015
I also have a form with combobox where a user can select which year he or she can print. Selecting a year on the combobox runs a report for that particular year/table.
The report’s record source is from this query, qrySUMMARYREPORT, and this query is based on the tables above (depending on which year is selected)
How do I change a table name from a query using VBA?
Or is there a better approach on this one?
Thanks in advance!!!
tblYear2011
tblYear2012
tblYear2013
tblYear2014
tblYear2015
I also have a form with combobox where a user can select which year he or she can print. Selecting a year on the combobox runs a report for that particular year/table.
The report’s record source is from this query, qrySUMMARYREPORT, and this query is based on the tables above (depending on which year is selected)
How do I change a table name from a query using VBA?
Or is there a better approach on this one?
Thanks in advance!!!