I have two tables in an Access database which are identical in structure (ie same fields, data types etc), but Table1 contains 'preliminary' data, and Table2 contains 'final' data.
I have a number of Excel workbooks containing pivot tables that all use Table1 as their data source. Is there any way using VBA to switch from Table1 as the data source to Table2, and vice versa? For example, one person may want to use the pivot tables to view preliminary data (from Table1) and another may want to use the same pivot tables to view final data (from Table2). I was able to retrieve the SourceData SQL string from the pivottable, but this is read only - is it possible to change the SQL string programmatically, or make the change some other way?
I have a number of Excel workbooks containing pivot tables that all use Table1 as their data source. Is there any way using VBA to switch from Table1 as the data source to Table2, and vice versa? For example, one person may want to use the pivot tables to view preliminary data (from Table1) and another may want to use the same pivot tables to view final data (from Table2). I was able to retrieve the SourceData SQL string from the pivottable, but this is read only - is it possible to change the SQL string programmatically, or make the change some other way?