Error Code List (1 Viewer)

LaurieW

Registered User.
Local time
Today, 16:07
Joined
May 9, 2002
Messages
99
Does anyone know where I can find a list of error codes for Access? A user had a problem in one of my databases today. When I compacted/repaired it using Access' utility I received these errors in a table called MSysCompactError:

-1206 Could not find field 'Description'
-1053 Could not find field 'Description'

I compacted again and did not receive these errors, so I think the database is fine. I would just like to look these up to see if I can get more information on what they mean. Also, I'm sure it would be helpful to have an error list for the future.

Thanks!
Laurie
 
Go to one of your code modules and select Debug, Compile All Modules. Sounds to me like you have an something invalid in your code. I do have a list of all error codes, it is 1,068 rows, and these are not listed, I believe, because they are specific to your written code.
 
Error List

Thanks for the code...I'll give it a try!
 
ErrorList; module won't run

I pasted the code you supplied into a module. When I try to compile it I get errors ... the first is:

User-defined type not defined

The piece of code "dbs as DAO.Database" is highlighted. I've tried figuring this out, but am stuck...I'm not an expert at debugging. Can you help?? When I type on a new line "Dim dbs As " from the list that comes up "DAO" is not available.

Thanks...
 
Laurie:

In your module goto Tools > References

Make sure the following is checked :

Microsoft DAO 3.6 object Library

HTH
 
Add in References MS ADO 2.7 Ext for DLL and Security
Then paste code:

Dim cat As New ADOX.Catalog 'Data base Catalog
Dim tbl As New ADOX.Table
Dim cnn As ADODB.Connection
Dim rst As New ADODB.Recordset, lngCode As Long
Dim strAccessErr As String

Const conAppObjectError = "Application-defined or object-defined error"
On Error GoTo Error_AccessandJetErrorsTable

Set cnn = CurrentProject.Connection
'Create error
tbl.Name = "AccessAndJetErrors"
tbl.Columns.Append "ErrorCode", adInteger
tbl.Columns.Append "ErrorString", adLongVarWChar

Set cat.ActiveConnection = cnn
cat.Tables.Append tbl
rst.Open "AccessAndJetErrors", cnn, adOpenStatic, adLockOptimistic
For lngCode = 0 To 3500
On Error Resume Next
strAccessErr = AccessError(lngCode)
DoCmd.Hourglass True
If strAccessErr <> "" Then
If strAccessErr <> conAppObjectError Then
rst.AddNew
rst!ErrorCode = lngCode
rst!ErrorString = strAccessErr
rst.Update
End If
End If
Next lngCode
rst.Close
DoCmd.Hourglass False
RefreshDatabaseWindow
MsgBox "Access and Jet errors table created."

Exit_accessAndJetErrorsTable:
Exit Sub
Error_AccessandJetErrorsTable:
MsgBox Err & ": " & Err.Description
AccessAndJetErrorsTable = False
Resume Exit_accessAndJetErrorsTable
 

Users who are viewing this thread

Back
Top Bottom