user3805734
user3805734

Reputation: 1

Access Corrupted/Trying to Export Forms

I have an MS Access (ACCDB File) that is corrupted. The error is the generic "The Microsoft Access Database Engine could not find the object 'Databases'. I have tried searching Google, tried using Stellar Phoenix software to recover the database, and also tried importing the database into a new one. None of which have worked to recover the Forms. The data is safe as it's stored in SharePoint.

Does anyone know of a way to export the Forms from this corrupted database to BAS Files? I cannot get this database to open at all and the most recent backup is 3 weeks ago (apparently my computer wasn't backing up to the remote server it should have been and what a way to discover that).

Any help is appreciated!

Upvotes: 0

Views: 139

Answers (1)

Fionnuala
Fionnuala

Reputation: 91366

If you save the following script to a VBScript file, for example, Decompile.vbs, and drag and drop a copy of your corrupt database on to the script file, or just use the message box to enter the path for the copy, there is a possibility you can recover your forms. I am using Windows 7 64 bit, but I think the path to MS Access should work.

Option Explicit

Dim WSHShell
Dim fs, sPath, sPathTemp, sAccessPath, sKey


    Set fs = CreateObject("Scripting.FileSystemObject")

    If WScript.Arguments.Count > 0 Then
        sPath = WScript.Arguments.Item(0)
    Else
        sPathTemp = Left(WScript.ScriptFullname, _
            InStrRev(WScript.ScriptFullname, "\"))

        sPath = InputBox("Enter Path and Name of .mdb or accdb", "Decompile", sPathTemp)
    End If

    If sPath = "" Or fs.FileExists(sPath) = False Then
        MsgBox "Not a valid file: " & vbCrLf & sPath, 64, "Decompile" '64=vbInformation
    Else
       Set WSHShell = CreateObject("WScript.Shell")
       sKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\MSACCESS.EXE\"
       sAccessPath = WSHShell.RegRead(sKey)
       WSHShell.Run  Chr(34) & sAccessPath & Chr(34) & " " & Chr(34) & sPath & Chr(34) & " /decompile"
    End If

Upvotes: 0

Related Questions