ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using a saved query to retrieve data from different sources (https://www.excelbanter.com/excel-programming/316432-using-saved-query-retrieve-data-different-sources.html)

Gary Hall[_2_]

Using a saved query to retrieve data from different sources
 
i would like to use a saved query in more than one worksheet to retrieve data
from more than one ODBC data source.

however when i copy the query between sheets it does not give me the option
to change the data source.

is this possible wihtout renaming the query seven times and and pointing it
at seven different sources?

Any help would be appreciated.

thanks


keepITcool

Using a saved query to retrieve data from different sources
 


you could write a little VBA to do a REPLACE on the querytable's
connection string.

have you looked into parameter queries? (though it's success would
depend on what your actually retrieving from what..

what type of datasource (which driver) are we talking about?

a bit more detail would be nice :)



--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Gary Hall wrote :

i would like to use a saved query in more than one worksheet to
retrieve data from more than one ODBC data source.

however when i copy the query between sheets it does not give me the
option to change the data source.

is this possible wihtout renaming the query seven times and and
pointing it at seven different sources?

Any help would be appreciated.

thanks



All times are GMT +1. The time now is 01:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com