+ Reply to Thread
Results 1 to 10 of 10

Error #13 during importing data. query error?? or wot?

  1. #1
    Registered User
    Join Date
    11-23-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    18

    Arrow Error #13 during importing data. query error?? or wot?

    I imported some data from an MDB file while working at home.
    created a macro to that effect. and it works fine at my home PC.
    but when i try t execute this macro on another PC or work place, then it gives error #13. i dont understand why. something is wrong with the code. i think it is the "WITH" code for query tables connection giving error. can anyone debug this for me please. posting the whole code below.

    Please Login or Register  to view this content.

    THIS WORKS AT HOME. BUT NOT AT MY WORKPLACE IN OFFICE.

    MIGHT I ADD. I HAVE MS ACCESS INSTALLED AT HOME. WHILE NO MS ACCESS INSTALLED AT MY WORK PLACE.
    do help someeone.
    Last edited by sspandit; 02-02-2010 at 05:58 AM. Reason: code font

  2. #2
    Registered User
    Join Date
    11-23-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Error #13 during importing data. query error?? or wot?

    does it have to do anything with the presense or absence of MS query???

  3. #3
    Registered User
    Join Date
    11-23-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Error #13 during importing data. query error?? or wot?

    Please help guys !!! i am stuck with this one

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Error #13 during importing data. query error?? or wot?

    It would help if you told us on which line the error occurs...
    Is the path to the file longer when you are at work? Does it help if you don't use an array for the connection string, but just use a straight string?
    Remember what the dormouse said
    Feed your head

  5. #5
    Registered User
    Join Date
    11-23-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Error #13 during importing data. query error?? or wot?

    the error most prolly occurs in this part of code.
    the debug highlights this code
    Please Login or Register  to view this content.
    i tried straight line. gives same error.
    i tried on another PC which has MS access installed and the code worked fine.
    but it doesnt work on my own pc at work.
    seems i am not too confident with the MS query working..

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Error #13 during importing data. query error?? or wot?

    Can you connect to the database manually via the Get External Data menu?

  7. #7
    Registered User
    Join Date
    11-23-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Error #13 during importing data. query error?? or wot?

    i can connect only by using "IMPORT DATA" . but not able to use the "NEW DATABASE QUERY"
    IT SAYS NO MS QUERY INSTALLED.

  8. #8
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Error #13 during importing data. query error?? or wot?

    That's probably the issue then! Can you get it installed?

  9. #9
    Registered User
    Join Date
    11-23-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Error #13 during importing data. query error?? or wot?

    hmm so my sheet wont work or wont import external data if ms access or ms query is not installed.
    i did get ms query installed now. but i had redefine the queries again. and now they work fine in the macro.
    i am still not able to understand why it wont work.
    once defined query should work irrepective of ms access.
    hmm anyways...
    is there any other way or code to import external data from an MDB file. i need only some selective Columns from the database tables. would appreciate if you coudl suggest some other piece of code.

  10. #10
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Error #13 during importing data. query error?? or wot?

    The problem is not importing the data (since you could do that manually), the problem is creating a querytable - i.e. a live refreshable link to the database. For that you need MSQuery.
    Why do you need another piece of code if you have it working now?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1