Hi, I need help on creating a dynamic VBA code. With Access97, I'm doing the following;
There are 12 tables,tbl0702, tbl0802..., tbl0603, in the Master.mdb, populated with the data imported from mainframe on a monthly basis. Each month, the data is split by dept and export to Depta0203.mdb, Detpb0203.mdb..., Depte0203.mdb. Each fiscal year, I create new tables in the Master.mdb like tbl0703, tbl0803...tbl0604, and create new dept database like Depta0304.mdb, Deptb0304.mdb, etc. To ensure the data accuracy in the dept database, I use union query to get record count from Master.mdb and the record count from individual dept database and reconcile them. When new fiscal year comes, it's time-consuming to change the table name from tbl0702 to tbl0703, etc and database name from Depta0203.mdb to Depta0304.mdb,etc in the union query. Is there any better way to do this? Any help is appreciated.![[ponder] [ponder] [ponder]](/data/assets/smilies/ponder.gif)
There are 12 tables,tbl0702, tbl0802..., tbl0603, in the Master.mdb, populated with the data imported from mainframe on a monthly basis. Each month, the data is split by dept and export to Depta0203.mdb, Detpb0203.mdb..., Depte0203.mdb. Each fiscal year, I create new tables in the Master.mdb like tbl0703, tbl0803...tbl0604, and create new dept database like Depta0304.mdb, Deptb0304.mdb, etc. To ensure the data accuracy in the dept database, I use union query to get record count from Master.mdb and the record count from individual dept database and reconcile them. When new fiscal year comes, it's time-consuming to change the table name from tbl0702 to tbl0703, etc and database name from Depta0203.mdb to Depta0304.mdb,etc in the union query. Is there any better way to do this? Any help is appreciated.
![[ponder] [ponder] [ponder]](/data/assets/smilies/ponder.gif)