D
Duncs
On a Monday morning, I extract data from one of our sales systems
which is then imported into an Access database, and placed in a table
tblSalesData_ddmmyy. I then query against last weeks sales data and
this new sales data within Access, in order to produce overall sales
figures.
Both last weeks and this weeks tables are identical in structure, so
every week when I run the queries, I need to alter them to reflect the
new table names. For example, last week the query would use the
tables tblSalesData_241108 & tblSalesData_011208. This week, it will
use the tables tblSalesData_011208 & tblSalesData_081208. The query
is the same, regardless of what week it runs. The only thing that
changes, is the names of the tables.
So, my question is, can the query be modified to take the table names
as parameters, and then run the query against those two tables?
TIA
Duncs
which is then imported into an Access database, and placed in a table
tblSalesData_ddmmyy. I then query against last weeks sales data and
this new sales data within Access, in order to produce overall sales
figures.
Both last weeks and this weeks tables are identical in structure, so
every week when I run the queries, I need to alter them to reflect the
new table names. For example, last week the query would use the
tables tblSalesData_241108 & tblSalesData_011208. This week, it will
use the tables tblSalesData_011208 & tblSalesData_081208. The query
is the same, regardless of what week it runs. The only thing that
changes, is the names of the tables.
So, my question is, can the query be modified to take the table names
as parameters, and then run the query against those two tables?
TIA
Duncs