ODBC Microsoft Access Driver Is Not a Valid Path

A few weeks ago, out of nowhere, I started receiving the following error when I started Excel after a restart or resuming from a locked computer.

Run-time error ‘-2147467259 (80004005)
[Microsoft][ODBC Microsoft Access Driver] ‘(unknown)’ is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.

I have a ton of add-ins that load at startup and more than a few of them connect to an Access database via ActiveX Data Objects (ADO). The offending code was simply establishing the ADO connection.

The global constant, gsMRPConn, pointed to the file correctly. I was able to access the network share via Windows Explorer. But when I executed the code

I got 0, meaning VBA couldn’t resolve the path. The fix for a while was to close Excel and restart. Sometimes one restart would fix it and other times it took up to five restarts. I was at a loss for why VBA couldn’t see the network share.

After much searching, I read something about offline files. I had no idea what offline files were or why I would want them. Apparently Windows makes a cache of network files locally so that I can access them when I’m not on the network. I typed “offline files” in the Win7 start menu and found the Offline Files dialog.

offline files dialog

I disabled offline files and have not had the problem since. I still don’t know how offline files work. I was connected to the network, so there was no need for Windows to use files offline. And if it had a cache, I’m not sure why it didn’t use it. I guess Windows was working to sync offline files in the background, which is why it worked after some number or restarts. I’m just glad the nightmare is over.

6 thoughts on “ODBC Microsoft Access Driver Is Not a Valid Path

  1. Interesting, very interesting indeed. I use offline files for it’s intended use – syncing stuff to my laptop when I’m out of the office, and for that it does a good job. However, Access DBs are not supported (somewhat reasonably) due to their multiuser capabilities, etc. Why it’s enabled by default though escapes (and annoys!) me.

    However, as I don’t use ADO within Excel, I’ve never noticed this issue, but could be serious for someone like me who does need it.

  2. Run-time error’-2147467259(80004005)’:
    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified,
    please help what should i do now for this?

  3. Run-time error’-2147467259(80004005)’:
    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified,
    please help what should i do now for this?

  4. Run-time error’-2147467259(80004005)’:
    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified,
    please help what should i do now for this?

  5. Hi sir,
    Plz Resoved the error problem.

    Run-time error’-2147467259 (80004005)’:
    (Microsoft)(ODBC Driver Manager) Data source name not found and no default driver specified,
    Plz Help what should i do for above error.

    Regards,
    Mohsin Janjua

  6. I am also facing the same issue:
    Run-time error’-2147467259(80004005)’:
    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified,
    please help what should i do now for this?


Posting code? Use <pre> tags for VBA and <code> tags for inline.

Leave a Reply

Your email address will not be published.