O'Reilly logo

F. Scott Barker's Microsoft® Access 2000 Power Programming by F. Scott Barker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

TESTING AND REPAIRING CORRUPTED JET BACK-END DATABASES

Section 6 of the ap_AppInit() function deals solely with handling the situation of repairing the back end if it requires it:

Case apErrDBCorrupted1, apErrDBCorrupted2

   '-- Section 6: Backend Corrupted. Compact/Repair?
   Beep
   If MsgBox("The Backend Database is Corrupted." & vbCrLf & _
        vbCrLf & "Would you like to log users out and " & _
        " attempt to compact/repair it?", vbYesNo + vbCritical, _
        "Corrupted Backend!") = vbYes Then

      DoCmd.OpenForm "ap_CompactDatabase", acForm

   Else

      flgLeaveApplication = True

   End If

End Select

The section starts with handling the situation that the value stored in intCurrError is equal to apErrDBCorrupted1 or apErrDBCorrupted2, the constants used for corrupted database ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required