#1   Report Post  
Junior Member
 
Posts: 5
Unhappy MS Query

I have created a Workbook(A) which extracts data from different workbooks(B to G) by using MS Query and stores in Workbook (A)

Workbook(A) is sitting on Server A.

Workbooks (B to G) are located on N, O, P, Q, R, S i.e. 6 different servers on 6 different locations in 6 different cities.

Workbook(A) has a macro assigned to run the MS Query (Refresh all)

I am connected to Server A and so as my colleague.

Workbook (A) is saved in a folder to which both of us have same access rights to alter, modify etc. all the files.

I can always use macro to refresh all the data and the query runs perfectly fine. However, my colleague encounters a problem and even though can access the file, he is not able to use Macro to refresh and run the query (the error message pertains to path)

I have reached a deadlock and do not have any answer to why. I can fully understand that path problems will come for my colleagues sitting on different servers but I have failed to understand as to why we 2 of us sitting on same server in same folder but my colleague cannot run the query.

Any help would be greatly appreciated.

Ps: I am not technically strong rather a DIY person.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default MS Query

The path specified in your macro must also be relative to the
workstation executing the macro if using mapped refs to the target
folders. Otherwise, try using an IP address for the target servers.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #3   Report Post  
Junior Member
 
Posts: 1
Default

Quote:
Originally Posted by GS[_2_] View Post
The path specified in your macro must also be relative to the
workstation executing the macro if using mapped refs to the target
folders. Otherwise, try using an IP address for the target servers.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
IP address is probably the best way to go unless the computers are not using a static address. If they use DHCP they will keep the same address and usually everyone is happy but in the case where power goes out or the PC is offline beyond its lease you may be assigned a new IP address. If you use a full address make sure you are not getting that address through a mapped drive where it looks like it should work but does not. Also mapped drive might be different. I also amuse that all the connections have been established for each location. The links for one location will not be the same as those at another location.

Make sure the rights are set up correctly too. Access to a shared folder does not mean you have rights to the folders they are in so the link might be stopped due to improper rights.

Sometimes the surest way to to manual input the path for each location and see if you can make a link.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default MS Query

I agree!
Thanks for the expanded detail...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #5   Report Post  
Junior Member
 
Posts: 5
Smile

Quote:
Originally Posted by raptor5618 View Post
IP address is probably the best way to go unless the computers are not using a static address. If they use DHCP they will keep the same address and usually everyone is happy but in the case where power goes out or the PC is offline beyond its lease you may be assigned a new IP address. If you use a full address make sure you are not getting that address through a mapped drive where it looks like it should work but does not. Also mapped drive might be different. I also amuse that all the connections have been established for each location. The links for one location will not be the same as those at another location.

Make sure the rights are set up correctly too. Access to a shared folder does not mean you have rights to the folders they are in so the link might be stopped due to improper rights.

Sometimes the surest way to to manual input the path for each location and see if you can make a link.
===========================

Garry and Raptor
It does make sense to me. I guess the surest solution would be to do manual input of the path for each location. I will give it a go this weekend and see whether it will work or not.

Many thanks for your time and effort in these replies; much appreciated. I will be back next week posting here my result whether I was successful in making this work. As said being a DIY I get results after few hits and trials.


  #6   Report Post  
Junior Member
 
Posts: 5
Smile

Quote:
Originally Posted by SinghNZ View Post
===========================

Garry and Raptor
It does make sense to me. I guess the surest solution would be to do manual input of the path for each location. I will give it a go this weekend and see whether it will work or not.

Many thanks for your time and effort in these replies; much appreciated. I will be back next week posting here my result whether I was successful in making this work. As said being a DIY I get results after few hits and trials.

Dear Garry and Raptor
Many thanks for your valuable advise. After few tries and it works perfectly now. I opened the connection in MS Excel and changed the path. Thank you very much.

Now, I need to ask you another question please.

There are 6 connections on each worksheet.

There will be 12 workbooks; 1 for each month; each workbook will have 4 worksheets; each representing each week.

You can imagine the amount of work involved if I have to create and manually correct each connection path.

Is there a simple way to work around this?

And to clarify further macro written in my first question. I did not wrote any code; I do not know actually how to write it. All I had done was recorded all the steps in a macro to activate 'refresh all' command found under Data tab.

I am assuming that a code will need to be written for performing above task. In simple terms, what I want is that every time I create a connection, correct path is recorded by default rather than me going in and correcting each path manually.

Any suggestions would be much appreciated.

Kindest regards
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 277
Default MS Query

On Wed, 29 May 2013 10:35:59 +0100, SinghNZ
wrote:

Is there a simple way to work around this?



Come up with a better paradigm for performing the data archiving task
you think this accomplishes.

It is like you are setting up all these interdependent links as an
exercise, as no professional would set up such an array to store critical
accounting data. It has too many vulnerabilities.

It would seem the location for a lot of the worksheets would best be on
the same sheet, instead of keeping them separate, thereby solving many of
the problems your concept has created.
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
Use MS Query to query data within the current work book Steve Kesler Excel Discussion (Misc queries) 0 August 6th 09 05:22 PM
Convert hard coded query criteria to Parameter Query Melanie[_2_] Excel Discussion (Misc queries) 0 July 15th 08 09:59 PM
Excel 2007 / MS Query - editing existing query to another sheet Hotpepperz Excel Discussion (Misc queries) 0 June 13th 08 06:53 PM
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? jocke Excel Discussion (Misc queries) 1 November 29th 05 01:44 PM
How to use a Access Query that as a parameter into Excel database query Karen Middleton Excel Discussion (Misc queries) 1 December 13th 04 07:54 PM


All times are GMT +1. The time now is 04:36 AM.

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

About Us

"It's about Microsoft Excel"