Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default Changing query data source

I have just found out that the data a query is looking up is a backup file as
the query is not showing recent data. I want to point the query to the live
data file (a dBase database). I cannot figure out where it is currently
pointing to as I have changed the filenames of any dBase files I thought it
could be pointing to then running the query & it still runs without throwing
up any errors.

How do I find out where the data source is located from the query? I
figured that when I find the data file I will change the filename & run the
query & it will come up with an error & allow me to point to the correct data
source. TIA
--
Tony
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default Changing query data source

Hi Tony,

"TonyL" wrote:
How do I find out where the data source is located from the query? I
figured that when I find the data file I will change the filename & run the
query & it will come up with an error & allow me to point to the correct data


Try running this bit of macro to give you the connection string in Sheet1!A1:

Sub FindConnection()
Sheets("Sheet1").Range("A1").Value = Sheets("Your query
sheet").QueryTables("Your query").Connection
End Sub

/Sune
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing ODBC data source for a query embedded in Excel Matt Colegrove Excel Discussion (Misc queries) 4 June 15th 07 01:04 AM
Changing data source on ODBC query Aussie CPA Excel Discussion (Misc queries) 2 June 14th 07 05:44 PM
Data Source for MS Query Suzseb Excel Discussion (Misc queries) 0 May 24th 06 08:09 PM
changing query source [email protected] Excel Worksheet Functions 2 March 21st 06 09:55 PM
MS Query Data Source Change rasinc Excel Discussion (Misc queries) 2 July 27th 05 07:09 PM


All times are GMT +1. The time now is 09:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"