Hi Anthony
Try this site (competition for this one I know ... but it also is excellent!).
http://www.accesswatch.co.uk/html/microsoft_access_downloads/access_watch_download _files.htm
Scroll down to the end and download the "All Access Error Codes" demo database.
- Download the self extracting file awerrors.exe 571Kb
This file contains the complete database awerrors.mdb -
This will give you all the error codes. An alternative to this is coding within your database that generates a list in a new table of error codes:
---------------------------------------------
Function AccessAndJetErrorsTable() As Boolean
' Comments :
' Parameters : -
' Returns : Boolean -
' Created :
' Modified :
'
' --------------------------------------------------------
Dim dbs As Database
Dim tdf As TableDef
Dim fld As Field
Dim rst As Recordset
Dim lngCode As Long
Dim strAccessErr As String
Const conAppObjectError = "Application-defined or object-defined error"
On Error GoTo Error_AccessAndJetErrorsTable
' Create Errors table with ErrorNumber and ErrorDescription fields.
Set dbs = CurrentDb
Set tdf = dbs.CreateTableDef("AccessAndJetErrors")
Set fld = tdf.CreateField("ErrorCode", dbLong)
tdf.Fields.Append fld
Set fld = tdf.CreateField("ErrorString", dbMemo)
tdf.Fields.Append fld
dbs.TableDefs.Append tdf
' Open recordset on Errors table.
Set rst = dbs.OpenRecordset("AccessAndJetErrors")
' Loop through error codes.
For lngCode = 0 To 3500
On Error Resume Next
' Raise each error.
strAccessErr = AccessError(lngCode)
DoCmd.Hourglass True
' Skip error numbers without associated strings.
If strAccessErr <> "" Then
' Skip codes that generate application or object-defined errors.
If strAccessErr <> conAppObjectError Then
' Add each error code and string to Errors table.
rst.AddNew
rst!ErrorCode = lngCode
' Append string to memo field.
rst!ErrorString.AppendChunk strAccessErr
rst.Update
End If
End If
Next lngCode
' Close recordset.
rst.Close
DoCmd.Hourglass False
'Refresh DatabaseWindow
MsgBox "Access and Jet errors table created."
AccessAndJetErrorsTable = True
Exit_AccessAndJetErrorsTable:
Exit Function
Error_AccessAndJetErrorsTable:
MsgBox Err & ": " & Err.Description
AccessAndJetErrorsTable = False
Resume Exit_AccessAndJetErrorsTable
End Function
---------------------------------------------
Copy this into a module, save it as basErrorCodes (or similar) and then run it. It will generate a list of errors in a table for you. Apologies to whoever created this - I picked it up ages ago and can't remember where. So none of the credit for this coding should go to me .. and if anyone out there knows where it comes from please post it here so the real author can be rightfully praised!
HTH
Rich Gorvin
[This message has been edited by Rich@ITTC (edited 04-19-2001).]