Results 1 to 12 of 12
  1. #1
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    716
    Thanks
    10
    Thanked 34 Times in 28 Posts
    Hi All,

    I have several Word templates which access an Access database to get various pieces of variable info: file folder location and people info. They populate vba forms in Word and are accessed with DAO (3.6). This works swell in Office 2000 through 2007. But in 2010, I get the error message:

    "Error #3343

    "Unrecognized database format <path to database>"

    I have found a lot of older stuff on this, but nothing that has helped. I've done a lot to test and am relatively certain the database I am trying to access is NOT corrupted, including creating a new db and importing everything without error. I've looked at my list of References in Word VBA and nothing is missing.

    Any suggestions on what to look for? I'm just about searched out (despite how perky the banana below is...).

    Thanks,
    Kim

    By the way, it looks as if there is no Access 2010 format and that the 2007 format is what 2010 uses by default (unless changed in options) -- is that right?

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts
    You are correct - there are no new database formats in Access 2010. It should support both the .accdb format and the .mdb format. I presume your database is in the .mdb format, so that should be OK. To get the data are you using automation in Access, or are you simply using DAO with a connect string of some sort? Unless you have some older VBA code that Word 2010 doesn't like, it seems to me it should work. Have you tried single-stepping through the code to the point where it fails? It may not be at the spot you expect - error messages in Office don't always tell you what is really wrong - so if you haven't already, try that.
    Wendell

  3. #3
    2 Star Lounger
    Join Date
    Dec 2009
    Location
    Midwest, USA
    Posts
    108
    Thanks
    5
    Thanked 5 Times in 4 Posts
    What operating system is on the Office 2010 machine - the same as the others. If it is Windows 7 you may have to "Trust" the path to the database (give permissions for access to the folder directory)..

  4. #4
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    716
    Thanks
    10
    Thanked 34 Times in 28 Posts
    Quote Originally Posted by WendellB View Post
    You are correct - there are no new database formats in Access 2010. It should support both the .accdb format and the .mdb format. I presume your database is in the .mdb format, so that should be OK. To get the data are you using automation in Access, or are you simply using DAO with a connect string of some sort? Unless you have some older VBA code that Word 2010 doesn't like, it seems to me it should work. Have you tried single-stepping through the code to the point where it fails? It may not be at the spot you expect - error messages in Office don't always tell you what is really wrong - so if you haven't already, try that.
    Wendell -- Actually, the db is in .accdb format -- I converted it when I started working with O2007. I'm using DAO from Word with a connect string and it errors at the point that it tries to connect. I may create a small db from scratch and test my method with a brand new db.

    Quote Originally Posted by John McVean View Post
    What operating system is on the Office 2010 machine - the same as the others. If it is Windows 7 you may have to "Trust" the path to the database (give permissions for access to the folder directory)..
    John -- OS is Windows XP SP3 - same as the others. Given your post, I tried adding the db's location to the Trusted locations in Word, but this didn't help.

    The problem seems to be with the database. Is there any possibility that the problem lies with DAO?

    My thanks to you both.
    K

  5. #5
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    716
    Thanks
    10
    Thanked 34 Times in 28 Posts
    Quote Originally Posted by kmurdock View Post
    Wendell -- Actually, the db is in .accdb format -- I converted it when I started working with O2007. I'm using DAO from Word with a connect string and it errors at the point that it tries to connect. I may create a small db from scratch and test my method with a brand new db.


    John -- OS is Windows XP SP3 - same as the others. Given your post, I tried adding the db's location to the Trusted locations in Word, but this didn't help.

    The problem seems to be with the database. Is there any possibility that the problem lies with DAO?
    OK, I created a brand new database for testing and I still get the "Unrecognized database format" error.

    However, I copied the older .mdb version of the db over to this PC and... it worked. I'm not sure I know what this means. The .accdb works in O2007, but not in O2010. And the .mdb works in all three. Not looking a gift horse in the mouth, but it seems like something's broken or changed in 2010.

    Thanks to all,
    K

  6. #6
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts
    However, I copied the older .mdb version of the db over to this PC and... it worked. I'm not sure I know what this means. The .accdb works in O2007, but not in O2010. And the .mdb works in all three. Not looking a gift horse in the mouth, but it seems like something's broken or changed in 2010.
    One possibility is that the connect string to an .accdb file needs to be different in Office 2010, but I've not seen anything like that documented. Do you have a particular reason for using the .accdb format? Unless you are using some of the new datatypes, there is no advantage that I am aware of in making that choice. And you do loose some functionality - Access User Security comes to mind.
    Wendell

  7. #7
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    716
    Thanks
    10
    Thanked 34 Times in 28 Posts
    Quote Originally Posted by WendellB View Post
    One possibility is that the connect string to an .accdb file needs to be different in Office 2010, but I've not seen anything like that documented. Do you have a particular reason for using the .accdb format?
    MSFT's documentation on using DAO from Word indicates that the connect string has not changed. The documentation might be inaccurate or I suppose this could be a bug...

    And I don't have a particular reason for using the .accdb format, except that my clients will be working in 2010... I assumed it would be advisable to update the db, too.

    Silly me.

    Thanks again!
    Kim

    **Added: I looked again at MSFT's Help file -- it's using a .mdb file, so I guess it's safe to say the documentation hasn't been updated. Or... is it possible DAO doesn't like .accdb? -- No, that can't be right because it worked in 2007... Hmmmm.**

  8. #8
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts
    It is also possible that you have hit a bug in Office - could your situation be simplified and sanitized so no personal information is involved so that it could be posted here so I can test it on my various systems. If I can duplicate it, then submitting it to Microsoft as a bug would be the next step.
    Wendell

  9. #9
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    716
    Thanks
    10
    Thanked 34 Times in 28 Posts
    Quote Originally Posted by WendellB View Post
    It is also possible that you have hit a bug in Office - could your situation be simplified and sanitized so no personal information is involved so that it could be posted here so I can test it on my various systems. If I can duplicate it, then submitting it to Microsoft as a bug would be the next step.
    Wendell, thank you for this offer.

    In prepping the 2010 db and Word template for you to test, I tried running the whole thing on my 2007 system. When my Word template tried to access the db, I again got the unrecognized format error message. Access 2007 could not open the database directly, either -- same error.

    So... Access 2007 can read the .accdb format if it was created in 2007, but it can't read the .accdb format when created in 2010, even though it is in the "Access 2007" format.

    Access 2010 has no problem opening the test db, nor does it have a problem opening the dbs created in prior versions. I simply can't use DAO to pull info from a db created in Access 2010 OR 2007. It just doesn't like the .accdb format.

    Hmmmm. I will be very interested to hear what your results are.

    Place the db in C:\ and open the Word template. There is a tab at far right with a Happy Face button, or you can run it from a "regular" macro. The code is not protected.

    Thanks again,
    Kim
    Attached Files Attached Files

  10. #10
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts
    That looks very interesting - I'll let you know what I find.
    Wendell

  11. #11
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts
    OK - I was able to duplicate the issue with 2007 not being able to open the .accdb database. After some digging, it turns out if you accidentally turn on any of the features unique to Access 2010, a flag gets set that tells 2007 the database is not a recognized format. If you import all the objects into a new database in 2010, and don't turn on any 2010 features, then the database can be read again in 2007. The 2010 features include such things as data macros, calculated columns, web sharing, etc. See this Technet article for some further information.

    There is another issue however - DAO can't work with a .accdb file, for that you either need to use OLEDB, or you need to switch back to using .mdb database files. My advice would be the latter as long as you don't need any of the features that .accdb files give you such as multi-valued fields - so far I've not found a compelling reason to use that format in any of the projects we have done.
    Wendell

  12. #12
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    716
    Thanks
    10
    Thanked 34 Times in 28 Posts
    Quote Originally Posted by WendellB View Post
    There is another issue however - DAO can't work with a .accdb file, for that you either need to use OLEDB, or you need to switch back to using .mdb database files. My advice would be the latter as long as you don't need any of the features that .accdb files give you such as multi-valued fields - so far I've not found a compelling reason to use that format in any of the projects we have done.
    First, thank you so much for testing this.

    I do feel compelled to reiterate that in 2007, DAO works with a *.accdb file. However, given that it doesn't work in 2010, for the sake of simplicity I will stay with .mdb format.

    As for 2010 being able to create a file that cannot be read by 2007, despite the fact that it's called the 2007 format, why does MSFT not include a 2010 format which preserves those 2010 features that don't work in 2007? I don't know if or how I turned on any features of 2010. I did not use any of the features you mentioned above, nor indeed anything that I couldn't do in any previous version. It would be much less confusing for Access to simply have a 2010 format which preserves these new features and a 2007 format which doesn't. Or did they think one more "format" would be more confusing?

    No matter what, I remain...

    Thanks again!
    Kim

Posting Permissions

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