Results 1 to 5 of 5
  1. #1
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5

    Answered: Programatically saving an MDB file to accdb (2010 or 2013) after I have it open in c

    Programatically saving an MDB file to accdb (2010 or 2013) after I have it open in code

    Thanks to Sinndho I have been able to write a nice snippet that looks at many data bases in a folder , records their references , records the bad references, unchecks the bad references and saves all of that information.

    once I have the data base open programmatically how can I save it to the latest version of Access?

    Thank you in advance.
    Dale Houston, TX

  2. Best Answer
    Posted by axsprog

    "Looked long and hard - did not even know this was an available function and method.

    here is a generic Snipett
    dim strFileSource as string, strDestinationforFile as string

    strFileSource = "C:\SomeFolder\test.MDB"
    strDestinationforFile = "C:\SomeotherFolder\test.accdb"

    Call Application.ConvertAccessProject(strFileSource, strDestinationForFile, AcFileFormat.acFileformatAccess2007)"


  3. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Not sure if you can outside of Access itself short of creating an new db in the required format and then copying all objects into that new db. But what you wont get is any 'handholding' on differences between mdb and accdb.

    Anither approach may be to invoke a copy of ms access and dothe process in access
    I'd rather be riding on the Tiger 800 or the Norton

  4. #3
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5
    that's what I meant in vba from an access application I have code that is opening the file and checking the references but instead of just closing the file at the end of the code I need to save the mdb's as accdb format.

    I couldn't edit my thread title and ran out of room at the letter "C" I meant for it to say code as in VBA code.

    Does this clarify that ? LOL
    Dale Houston, TX

  5. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    dunno if you can, but you should be able to drve the file save dialog and set the file type as ACCDB
    I'd rather be riding on the Tiger 800 or the Norton

  6. #5
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5

    resolved

    Looked long and hard - did not even know this was an available function and method.

    here is a generic Snipett
    dim strFileSource as string, strDestinationforFile as string

    strFileSource = "C:\SomeFolder\test.MDB"
    strDestinationforFile = "C:\SomeotherFolder\test.accdb"

    Call Application.ConvertAccessProject(strFileSource, strDestinationForFile, AcFileFormat.acFileformatAccess2007)
    Dale Houston, TX

Posting Permissions

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