G
Guest
I have a workbook with 6 excel saved queries and pivot tables based on an
Access Database. Each month I copy the entire contents of the folder to a new
folder (example DbPop200404Apr gets copied to DBPop200405May). The access
database gets updated and I want the excel pivot tables and charts to reflect
this data. The queries on each worksheet still relate back to the original,
even though I edit each DQY to reflect the new directory. I have to go each
worksheet and reconstruct the query.
How do you make excel automatically use the DQYs in the CURRENT directory
where the workbook resides? I would even be willing to write a macro or vb
code to accomplish this.
Example below I edit this to change DbData200409SEP to look at DbData200410OCT
but the worksheet will still point to the DQY in DbData200409SEP.
XLODBC
1
DSN=MS Access
Database;DBQ=F:\DATA\Projects\DbData200409SEP\DbData2k.mdb;DefaultDir=F:\DATA\Projects\DbData200409SEP\;DriverId=25;FIL=MS
Access;MaxBufferSize=2048;PageTimeout=5;
SELECT q12aMonthlyIssueSum.`Report Month`, q12aMonthlyIssueSum.Cases FROM
`F:\DATA\Projects\DbData200409SEP\ExpeditedFs2k`.q12aMonthlyIssueSum
q12aMonthlyIssueSum ORDER BY q12aMonthlyIssueSum.`Report Month` DESC
Thank You
Access Database. Each month I copy the entire contents of the folder to a new
folder (example DbPop200404Apr gets copied to DBPop200405May). The access
database gets updated and I want the excel pivot tables and charts to reflect
this data. The queries on each worksheet still relate back to the original,
even though I edit each DQY to reflect the new directory. I have to go each
worksheet and reconstruct the query.
How do you make excel automatically use the DQYs in the CURRENT directory
where the workbook resides? I would even be willing to write a macro or vb
code to accomplish this.
Example below I edit this to change DbData200409SEP to look at DbData200410OCT
but the worksheet will still point to the DQY in DbData200409SEP.
XLODBC
1
DSN=MS Access
Database;DBQ=F:\DATA\Projects\DbData200409SEP\DbData2k.mdb;DefaultDir=F:\DATA\Projects\DbData200409SEP\;DriverId=25;FIL=MS
Access;MaxBufferSize=2048;PageTimeout=5;
SELECT q12aMonthlyIssueSum.`Report Month`, q12aMonthlyIssueSum.Cases FROM
`F:\DATA\Projects\DbData200409SEP\ExpeditedFs2k`.q12aMonthlyIssueSum
q12aMonthlyIssueSum ORDER BY q12aMonthlyIssueSum.`Report Month` DESC
Thank You