![]() |
Modify a data query ??
I'm able to create data queries that pull data from a Visual FoxPro table,
but the query ends up with a fixed path to the data. Is there a way to parameterize the path so the user can provide it in a cell on the worksheet and the query references that cell for its path to the data? Thank you very much, CM |
Modify a data query ??
CM wrote:
I'm able to create data queries that pull data from a Visual FoxPro table, but the query ends up with a fixed path to the data. Is there a way to parameterize the path so the user can provide it in a cell on the worksheet and the query references that cell for its path to the data? CM: No, you can't parameterize the path. You can change the path with VBA, though. See here http://www.dicks-clicks.com/excel/Ex...htm#ChangeConn You could put it in a Worksheet_Change event so that when the user changed the path in a certain cell, it would update the Connection and CommandText strings of your external data query. -- Dick Kusleika MVP - Excel Excel Blog - Daily Dose of Excel www.dicks-blog.com |
Modify a data query ??
Thank you very much for your help.
CM. "Dick Kusleika" wrote: CM wrote: I'm able to create data queries that pull data from a Visual FoxPro table, but the query ends up with a fixed path to the data. Is there a way to parameterize the path so the user can provide it in a cell on the worksheet and the query references that cell for its path to the data? CM: No, you can't parameterize the path. You can change the path with VBA, though. See here http://www.dicks-clicks.com/excel/Ex...htm#ChangeConn You could put it in a Worksheet_Change event so that when the user changed the path in a certain cell, it would update the Connection and CommandText strings of your external data query. -- Dick Kusleika MVP - Excel Excel Blog - Daily Dose of Excel www.dicks-blog.com |
All times are GMT +1. The time now is 12:15 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com