Results 1 to 8 of 8
  1. #1
    DJHarris71 is offline Novice
    Windows 10 Office 365
    Join Date
    Jan 2023
    Posts
    3

    VBA to Save As Access 2000 Database (accdb to mdb)

    I work with an old application that still needs databases in the access 2000 format.
    The current version (365) has a way to 'Save As' Access 2000 format (mdb).
    Anyone know the vba code to emulate this?
    Thanks in advance.

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  4. #4
    DJHarris71 is offline Novice
    Windows 10 Office 365
    Join Date
    Jan 2023
    Posts
    3
    Quote Originally Posted by Gicu View Post
    Looks like that is accdb to mdb, houwever it lead me to this command, 'AcFileFormat.acFileFormatAccess2007', which can be used with .acFileFormatAccess2000 instead. I will try this out. Thanks!

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Post 4 was moderated, I'm posting to trigger email notifications.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Quote Originally Posted by DJHarris71 View Post
    Looks like that is accdb to mdb, houwever it lead me to this command, 'AcFileFormat.acFileFormatAccess2007', which can be used with .acFileFormatAccess2000 instead. I will try this out. Thanks!
    how to convert ms access .mdb to .accdb using VBA

    Code:
    src = [COLOR=var(--highlight-variable)]"c:\csnet\file.mdb"[/COLOR]
      dst = [COLOR=var(--highlight-variable)]"c:\csnet\file.accdb"[/COLOR]
      
      ConvertAccessProject src, dst, AcFileFormat.acFileFormatAccess2007
    Edit: I tried it on one of my still mdb files and it complained that the file had already been converted.? Tried another twice with no complaint.?
    I *think* the first one I had saved manually as an accdb?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  7. #7
    DJHarris71 is offline Novice
    Windows 10 Office 365
    Join Date
    Jan 2023
    Posts
    3
    Worked like a charm. The fun part about this is that I was doing this from Visio. Thanks!!

    Code:
    Dim acc As Object
    Set acc = CreateObject("Access.application")
    acc.ConvertAccessProject "SourcePath", "DestPath", 9 'AcFileFormat.acFileFormatAccess2000  have to hard code the number since we are in visio
    acc.Quit

  8. #8
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 12-21-2021, 12:46 PM
  2. Access Database - .accdb and .mdb Mixed
    By Lou Sander in forum Access
    Replies: 4
    Last Post: 11-06-2020, 11:57 AM
  3. Replies: 2
    Last Post: 11-27-2016, 11:12 PM
  4. Access 2000 Database Log In Hang Up
    By nonamedeveloper in forum Access
    Replies: 0
    Last Post: 03-18-2015, 11:18 AM
  5. Upgrading Access 2000 Database Issues
    By JoeM in forum Access
    Replies: 15
    Last Post: 04-17-2014, 02:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums