Convert Access ACCDB to MDB DB

Patrick Quinn
Patrick Quinn used Ask the Experts™
on
I have a current Access DB saved an *.accdb.  I am trying to convert this DB to the *.mdb format.  However the current Access DB has embedded macros within it.  How can I disable these macros so that I can convert this Access DB into the older MDB format??

Sincerely,

Patrick Q

PATRICK QUINN  
SENIOR DATABASE DEVELOPER
NA ALIʻI, LLC
An 8(a)ccessible Native Hawaiian Owned Company
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Have you tried just Save As.. 2003 MDB?
Jim Dettman (EE MVE)President / Owner
Most Valuable Expert 2017
Most Valuable Expert 2012

Commented:
How can I disable these macros so that I can convert this Access DB into the older MDB format??

 You have to delete them.  Save As won't let you do that until you do.

Jim.

Author

Commented:
I did, but it came stating there are features in the ACCDB DB that could not be converted.  It was determined that the embedded macros was the cause of the issue.  This ACCDB DB was given to me to convert, and I am not a big expert on Access.
Should you be charging more for IT Services?

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Jim Dettman (EE MVE)President / Owner
Most Valuable Expert 2017
Most Valuable Expert 2012

Commented:
and BTW, it's never a good idea to go backwards, even with A2010 to A2007, which are very close.   To many features that need to be stripped out.

Jim.

Author

Commented:
So, I have to delete the macros themselves, not just disable them??
Jim Dettman (EE MVE)President / Owner
Most Valuable Expert 2017
Most Valuable Expert 2012

Commented:
It was determined that the embedded macros was the cause of the issue.

That would be the case.   You will find this article helpful in what needs to be removed:

https://support.office.com/en-us/article/save-an-access-2010-database-in-an-earlier-file-format-efd3b0ca-e0da-44f9-a087-407376ddf211

Jim.
Jim Dettman (EE MVE)President / Owner
Most Valuable Expert 2017
Most Valuable Expert 2012

Commented:
So, I have to delete the macros themselves, not just disable them?

 Yes.
Mark EdwardsChief Technology Officer

Commented:
Patrick:  Thought you could use a function that examines the Access application and current Access database file and gets you their version and the VBE version:

Private Sub cmdAccessEnvironment_Click()
    On Error GoTo sub_err
    Dim blnRunTime As Boolean
    Dim sglAppVersion As Single
    Dim strAppVersion As String
    Dim sglAppVBEVersion As Single
    Dim strAppVBEVersion As String
    Dim sglFileVersion As Single
    Dim strFileVersion As String
    Dim strExt As String
    'GET THE APPLICATION RUN MODE:
    blnRunTime = SysCmd(acSysCmdRuntime)
    'GET ACCESS APPLICATION VERSION:
    Select Case Val(Application.Version)
          Case 7: strAppVersion = "Access 95 (ver " & Application.Version & ")"
          Case 8: strAppVersion = "Access 97 (ver " & Application.Version & ")"
          Case 9: strAppVersion = "Access 2000 (ver " & Application.Version & ")"
          Case 10: strAppVersion = "Access 2002(XP) (ver " & Application.Version & ")"
          Case 11: strAppVersion = "Access 2003 (ver " & Application.Version & ")"
          Case 12: strAppVersion = "Access 2007 (ver " & Application.Version & ")"
          Case 13: strAppVersion = "Invalid (ver " & Application.Version & ")!"
          Case 14: strAppVersion = "Access 2010 (ver " & Application.Version & ")"
          Case 15: strAppVersion = "Access 2013 (ver " & Application.Version & ")"
          Case Else: strAppVersion = "Unknown (ver " & Application.Version & ")"
    End Select
    'GET APPLICATION VBE (VISUAL BASIC ENVIRONMENT) VERSION:
    strAppVBEVersion = "VB " & Application.VBE.Version
    'GET THE VERSION OF THE LOADED ACCESS DATABASE FILE:
    Select Case Val(CurrentDb.Version)
          Case 7: strFileVersion = "Access 95 (ver " & CurrentDb.Version & ")"
          Case 8: strFileVersion = "Access 97 (ver " & CurrentDb.Version & ")"
          Case 9: strFileVersion = "Access 2000 (ver " & CurrentDb.Version & ")"
          Case 10: strFileVersion = "Access 2002(XP) (ver " & CurrentDb.Version & ")"
          Case 11: strFileVersion = "Access 2003 (ver " & CurrentDb.Version & ")"
          Case 12: strFileVersion = "Access 2007 (ver " & CurrentDb.Version & ")"
          Case 13: strFileVersion = "Invalid (ver " & CurrentDb.Version & ")!"
          Case 14: strFileVersion = "Access 2010 (ver " & CurrentDb.Version & ")"
          Case 15: strFileVersion = "Access 2013 (ver " & CurrentDb.Version & ")"
Case 15: strFileVersion = "Access 2013 (ver " & CurrentDb.Version & ")"
          Case Else: strFileVersion = "Unknown (ver " & CurrentDb.Version & ")"
    End Select
    'GET THE CURRENT DB FILE NAME EXTENSION - THE FUNCTION BELOW IS MY OWN _
     CUSTOM FUNCTION FOR GETTING THE EXTENSION OF ANY FILE NAME PARAMETER:
    strExt = modSystem.Get_File_Extention(CurrentDb.Name)
    'DISPLAY A MESSAGE BOX TO THE USER SHOWING THE VERSIONS OF THE _
     APPLICATION BEING USED AND THE OPENED ACCESS FILE:
    MsgBox "You are using MSAccess.exe version " & strAppVersion & "." _
    & vbCrLf & "Your Access VBE (VB Environment) version is " & strAppVBEVersion & "." _
    & vbCrLf & "This running Access file (." & strExt & ") is version " & strFileVersion & "." _
    & vbCrLf & "Access is currently running in " & IIf(blnRunTime = True, "Run-Time", "Full Version") & " mode." _
    , vbInformation, "Your Access Environment:"
    'OPEN THE MS ACCESS SYSTEM INFORMATION DIALOG:
    DoCmd.RunCommand (acCmdAboutMicrosoftAccess)
    
exit_sub:
    Exit Sub
    
sub_err:
    MsgBox Err.Description, vbCritical, "Error in " & Me.Name & ".cmdAccessEnvironment_Click() event:"
    Resume exit_sub
End Sub

Open in new window

Mark EdwardsChief Technology Officer

Commented:
Patrick:  This was my first time using the code insert and I was in the middle of making an edit when the EE app went ahead and published my comment before I was ready to do it.  I'll try again:

Private Sub cmdAccessEnvironment_Click()
    On Error GoTo sub_err
    Dim blnRunTime As Boolean
    Dim sglAppVersion As Single
    Dim strAppVersion As String
    Dim sglAppVBEVersion As Single
    Dim strAppVBEVersion As String
    Dim sglFileVersion As Single
    Dim strFileVersion As String
    Dim strExt As String
    'GET THE APPLICATION RUN MODE:
    blnRunTime = SysCmd(acSysCmdRuntime)
    'GET ACCESS APPLICATION VERSION:
    Select Case Val(Application.Version)
          Case 7: strAppVersion = "Access 95 (ver " & Application.Version & ")"
          Case 8: strAppVersion = "Access 97 (ver " & Application.Version & ")"
          Case 9: strAppVersion = "Access 2000 (ver " & Application.Version & ")"
          Case 10: strAppVersion = "Access 2002(XP) (ver " & Application.Version & ")"
          Case 11: strAppVersion = "Access 2003 (ver " & Application.Version & ")"
          Case 12: strAppVersion = "Access 2007 (ver " & Application.Version & ")"
          Case 13: strAppVersion = "Invalid (ver " & Application.Version & ")!"
          Case 14: strAppVersion = "Access 2010 (ver " & Application.Version & ")"
          Case 15: strAppVersion = "Access 2013 (ver " & Application.Version & ")"
          Case 16: strAppVersion = "Access 2016 (ver " & Application.Version & ")"
          Case Else: strAppVersion = "Unknown (ver " & Application.Version & ")"
    End Select
    'GET APPLICATION VBE (VISUAL BASIC ENVIRONMENT) VERSION:
    strAppVBEVersion = "VB " & Application.VBE.Version
    'GET THE VERSION OF THE LOADED ACCESS DATABASE FILE:
    Select Case Val(CurrentDb.Version)
          Case 7: strFileVersion = "Access 95 (ver " & CurrentDb.Version & ")"
          Case 8: strFileVersion = "Access 97 (ver " & CurrentDb.Version & ")"
          Case 9: strFileVersion = "Access 2000 (ver " & CurrentDb.Version & ")"
          Case 10: strFileVersion = "Access 2002(XP) (ver " & CurrentDb.Version & ")"
          Case 11: strFileVersion = "Access 2003 (ver " & CurrentDb.Version & ")"
          Case 12: strFileVersion = "Access 2007 (ver " & CurrentDb.Version & ")"
          Case 13: strFileVersion = "Invalid (ver " & CurrentDb.Version & ")!"
          Case 14: strFileVersion = "Access 2010 (ver " & CurrentDb.Version & ")"
          Case 15: strFileVersion = "Access 2013 (ver " & CurrentDb.Version & ")"
          Case 16: strFileVersion = "Access 2016 (ver " & CurrentDb.Version & ")"
          Case Else: strFileVersion = "Unknown (ver " & CurrentDb.Version & ")"
    End Select
    'GET THE CURRENT DB FILE NAME EXTENSION - THE FUNCTION BELOW IS MY OWN _
     CUSTOM FUNCTION FOR GETTING THE EXTENSION OF ANY FILE NAME PARAMETER:
    strExt = modSystem.Get_File_Extention(CurrentDb.Name)
    'DISPLAY A MESSAGE BOX TO THE USER SHOWING THE VERSIONS OF THE _
     APPLICATION BEING USED AND THE OPENED ACCESS FILE:
    MsgBox "You are using MSAccess.exe version " & strAppVersion & "." _
    & vbCrLf & "Your Access VBE (VB Environment) version is " & strAppVBEVersion & "." _
    & vbCrLf & "This running Access file (." & strExt & ") is version " & strFileVersion & "." _
    & vbCrLf & "Access is currently running in " & IIf(blnRunTime = True, "Run-Time", "Full Version") & " mode." _
    , vbInformation, "Your Access Environment:"
    'OPEN THE MS ACCESS SYSTEM INFORMATION DIALOG:
    DoCmd.RunCommand (acCmdAboutMicrosoftAccess)
    
exit_sub:
    Exit Sub
    
sub_err:
    MsgBox Err.Description, vbCritical, "Error in " & Me.Name & ".cmdAccessEnvironment_Click() event:"
    Resume exit_sub
End Sub

Open in new window


Hope this helps....
Dale FyeOwner, Dev-Soln LLC
Most Valuable Expert 2014
Top Expert 2010

Commented:
Patrick,

I assume this is a front-end that you are trying to convert.

I don't know what version of Access you are running, but you might be able to create a new accdb file and import all of your tables, forms, queries, reports, and code modules in the the new accdb.  Then do a save as into an earlier version, but I don't think that is going to do the job if you are running embedded macros and not saved macros.

You might have to use something like FindAndReplace to find all the references to "[Embedded Macro]"  but I would do this in the copy so that you can then identify where all of these occurences were and rebuild this functionality based on the original.

HTH
Dale
Distinguished Expert 2017

Commented:
NO - DO NOT DELETE THE MACROS!!!!!  All you have to do is to convert them to VBA.  The option is on the ribbon.

That isn't necessarily the end of the problem as you are seeing.  If you have any data types that were introduced with ACE such as multi-value fields, those need to be removed.  There are other features also that will cause a problem.

If what you are trying to do (you never actually said what your real objective was) is to get the app to run on a PC that doesn't have A2016, all you have to do is to download the latest version of the Access runtime engine and install that.  You still might have problems if you have not designed the application with good error trapping and no code or object modifications by users.  EVERYTHING must be controlled by YOUR forms.  YOU must provide some type of menu that allows access to all the application functionality because the runtime engine will NOT allow access to anything in design view.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial