Public Sub ShowErrors()
Dim db As Database
Dim recT As Recordset
Dim errE As Error
On Error GoTo ShowErrors_Err
Set db = CurrentDb()
Set recT = db.OpenRecordset("NonExistantTable")
recT.Close
ShowErrors_Exit:
Exit Sub
ShowErrors_Err:
Debug.Print "Err = " & Err.Number & ": " & Err.Description
Debug.Print
For Each errE In DBEngine.Errors
Debug.Print "Errors: " & errE.Number & ": " & errE.Description
Next
Resume ShowErrors_Exit
End Sub