473,811 Members | 3,719 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Listing of Access 2003 error codes?

PW
Hi,

There is code in Alison Balter's excellant "Mastering Access 2003" to
create a list of error codes and descriptions but it only generates
error messages 3 through 94. Is there a website with a list of all of
the error messages (with descriptions?).

Thanks,

-paul
Nov 2 '06 #1
8 12482
I don't remember where I got this code. If you recognize your code, let me
know and I'll add it to the code.

-----------------------------------
Function AccessAndJetErr orsTable() As Boolean

Dim dbs As DAO.Database, tdf As TableDef, fld As Field
Dim rst As DAO.Recordset, lngCode As Long
Dim strAccessErr As String
Const conAppObjectErr or = "Applicatio n-defined or object-defined error "
On Error GoTo Error_AccessAnd JetErrorsTable
' Create Errors table with ErrorNumber and ErrorDescriptio n fields.
Set dbs = CurrentDb
Set tdf = dbs.CreateTable Def("AccessAndJ etErrors")
Set fld = tdf.CreateField ("ErrorCode" , dbLong)
tdf.Fields.Appe nd fld
Set fld = tdf.CreateField ("ErrorStrin g", dbMemo)
tdf.Fields.Appe nd fld
dbs.TableDefs.A ppend tdf
' Open recordset on Errors table.
Set rst = dbs.OpenRecords et("AccessAndJe tErrors")
' Loop through error codes.
For lngCode = 0 To 3500
On Error Resume Next
' Raise each error.
strAccessErr = AccessError(lng Code)
DoCmd.Hourglass True
' Skip error numbers without associated strings.
If strAccessErr <"" Then
' Skip codes that generate application or object-defined errors.
If strAccessErr <conAppObjectEr ror 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
RefreshDatabase Window
MsgBox "Access and Jet errors table created."
AccessAndJetErr orsTable = True

Exit_AccessAndJ etErrorsTable:
Exit Function

Error_AccessAnd JetErrorsTable:
MsgBox Err & ": " & Err.Description
AccessAndJetErr orsTable = False
Resume Exit_AccessAndJ etErrorsTable
End Function
---------------------------------------------

PW wrote:
>Hi,

There is code in Alison Balter's excellant "Mastering Access 2003" to
create a list of error codes and descriptions but it only generates
error messages 3 through 94. Is there a website with a list of all of
the error messages (with descriptions?).

Thanks,

-paul
--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via http://www.accessmonster.com

Nov 3 '06 #2
PW
On Fri, 03 Nov 2006 00:20:30 GMT, "ruralguy via AccessMonster.c om"
<u12102@uwewrot e:
>I don't remember where I got this code. If you recognize your code, let me
know and I'll add it to the code.

-----------------------------------
Function AccessAndJetErr orsTable() As Boolean

Dim dbs As DAO.Database, tdf As TableDef, fld As Field
Dim rst As DAO.Recordset, lngCode As Long
Dim strAccessErr As String
Const conAppObjectErr or = "Applicatio n-defined or object-defined error "
On Error GoTo Error_AccessAnd JetErrorsTable
' Create Errors table with ErrorNumber and ErrorDescriptio n fields.
Set dbs = CurrentDb
Set tdf = dbs.CreateTable Def("AccessAndJ etErrors")
Set fld = tdf.CreateField ("ErrorCode" , dbLong)
tdf.Fields.App end fld
Set fld = tdf.CreateField ("ErrorStrin g", dbMemo)
tdf.Fields.App end fld
dbs.TableDefs. Append tdf
' Open recordset on Errors table.
Set rst = dbs.OpenRecords et("AccessAndJe tErrors")
' Loop through error codes.
For lngCode = 0 To 3500
On Error Resume Next
' Raise each error.
strAccessErr = AccessError(lng Code)
DoCmd.Hourglass True
' Skip error numbers without associated strings.
If strAccessErr <"" Then
' Skip codes that generate application or object-defined errors.
If strAccessErr <conAppObjectEr ror 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.Hourglas s False
RefreshDatabas eWindow
MsgBox "Access and Jet errors table created."
AccessAndJetEr rorsTable = True

Exit_AccessAnd JetErrorsTable:
Exit Function

Error_AccessAn dJetErrorsTable :
MsgBox Err & ": " & Err.Description
AccessAndJetErr orsTable = False
Resume Exit_AccessAndJ etErrorsTable
End Function
---------------------------------------------
Looks almost identical, except she loops through 10,000. I will give
it a shot. Thanks!

-pw
>PW wrote:
>>Hi,

There is code in Alison Balter's excellant "Mastering Access 2003" to
create a list of error codes and descriptions but it only generates
error messages 3 through 94. Is there a website with a list of all of
the error messages (with descriptions?).

Thanks,

-paul
Nov 3 '06 #3
PW
On Fri, 03 Nov 2006 00:20:30 GMT, "ruralguy via AccessMonster.c om"
<u12102@uwewrot e:
>I don't remember where I got this code. If you recognize your code, let me
know and I'll add it to the code.

-----------------------------------
Function AccessAndJetErr orsTable() As Boolean

Dim dbs As DAO.Database, tdf As TableDef, fld As Field
Dim rst As DAO.Recordset, lngCode As Long
Dim strAccessErr As String
Const conAppObjectErr or = "Applicatio n-defined or object-defined error "
On Error GoTo Error_AccessAnd JetErrorsTable
' Create Errors table with ErrorNumber and ErrorDescriptio n fields.
Set dbs = CurrentDb
Set tdf = dbs.CreateTable Def("AccessAndJ etErrors")
Set fld = tdf.CreateField ("ErrorCode" , dbLong)
tdf.Fields.App end fld
Set fld = tdf.CreateField ("ErrorStrin g", dbMemo)
tdf.Fields.App end fld
dbs.TableDefs. Append tdf
' Open recordset on Errors table.
Set rst = dbs.OpenRecords et("AccessAndJe tErrors")
' Loop through error codes.
For lngCode = 0 To 3500
On Error Resume Next
' Raise each error.
strAccessErr = AccessError(lng Code)
DoCmd.Hourglass True
' Skip error numbers without associated strings.
If strAccessErr <"" Then
' Skip codes that generate application or object-defined errors.
If strAccessErr <conAppObjectEr ror 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.Hourglas s False
RefreshDatabas eWindow
MsgBox "Access and Jet errors table created."
AccessAndJetEr rorsTable = True

Exit_AccessAnd JetErrorsTable:
Exit Function

Error_AccessAn dJetErrorsTable :
MsgBox Err & ": " & Err.Description
AccessAndJetErr orsTable = False
Resume Exit_AccessAndJ etErrorsTable
End Function
---------------------------------------------

PW wrote:
>>Hi,

There is code in Alison Balter's excellant "Mastering Access 2003" to
create a list of error codes and descriptions but it only generates
error messages 3 through 94. Is there a website with a list of all of
the error messages (with descriptions?).

Thanks,

-paul
>>AccessAndJetE rrorsTable = True
This returns "function call on left-hand side of assignment must
return variant or object".

And, I can't find the table "AccessAndJetEr rors"

-pw
Nov 14 '06 #4
Are you calling it from the immediate window with:
?AccessAndJetEr rorsTable()

What version of Access are you using?

PW wrote:
>>I don't remember where I got this code. If you recognize your code, let me
know and I'll add it to the code.
[quoted text clipped - 63 lines]
>>>
-paul
>>>AccessAndJet ErrorsTable = True

This returns "function call on left-hand side of assignment must
return variant or object".

And, I can't find the table "AccessAndJetEr rors"

-pw
--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via http://www.accessmonster.com

Nov 14 '06 #5
ruralguy wrote:
I don't remember where I got this code. If you recognize your code, let me
know and I'll add it to the code.
It's from Access 97 Help, as modified when Access 2000 came out, because
Recordset needed to be changed to DAO.Recordset to disambiguate it from ADODB.
Recordset, the default for Access 2000 and 2002.

--
Message posted via http://www.accessmonster.com

Nov 14 '06 #6
Thanks Granny. Attribute added.

Granny Spitz wrote:
>I don't remember where I got this code. If you recognize your code, let me
know and I'll add it to the code.

It's from Access 97 Help, as modified when Access 2000 came out, because
Recordset needed to be changed to DAO.Recordset to disambiguate it from ADODB.
Recordset, the default for Access 2000 and 2002.
--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via http://www.accessmonster.com

Nov 14 '06 #7
PW
On Tue, 14 Nov 2006 19:32:03 GMT, "ruralguy via AccessMonster.c om"
<u12102@uwewrot e:
>Are you calling it from the immediate window with:
?AccessAndJetE rrorsTable()

What version of Access are you using?
2003. I put the code behind a command button on a form. Do I save the
code as a module first?

>
PW wrote:
>>>I don't remember where I got this code. If you recognize your code, let me
know and I'll add it to the code.
[quoted text clipped - 63 lines]
>>>>
-paul
>>>>AccessAndJe tErrorsTable = True

This returns "function call on left-hand side of assignment must
return variant or object".

And, I can't find the table "AccessAndJetEr rors"

-pw
Nov 15 '06 #8
It is a function and returns a boolean value. Therefore use
Junk = AccessAndJetErr orsTable()
...to invoke the function from a command button.

PW wrote:
>>Are you calling it from the immediate window with:
?AccessAndJet ErrorsTable()

What version of Access are you using?

2003. I put the code behind a command button on a form. Do I save the
code as a module first?
>>>>I don't remember where I got this code. If you recognize your code, let me
know and I'll add it to the code.
[quoted text clipped - 10 lines]
>>>
-pw
--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via http://www.accessmonster.com

Nov 15 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
4766
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much appreciated. Thanks in advance
16
7241
by: TD | last post by:
This is the code under a command button - Dim ctl As Control For Each ctl In Me.Controls If ctl.BackColor <> RGB(255, 255, 255) Then ctl.BackColor = RGB(255, 255, 255) End If Next ctl
2
1163
by: Stu | last post by:
Hi, I have an asp.net page that lists all running processes on the server using the script below: Dim p As Process For Each p In Process.GetProcesses sb.Append(p.ProcessName) sb.Append("<br>") Next
12
3218
by: soccertl | last post by:
Is there a listing of what the compile errors mean? For example: "hdb_log.c", line 163.22: 1506-046 (S) Syntax error. "hdb_log.c", line 160.20: 1506-098 (E) Missing argument(s). make: 1254-004 The error code from the last command is 1. How do I find out what 1506-046 and 1506-098 mean? Thanks for any help.
7
5500
by: epikto | last post by:
I have a mapped share that I am trying to get a listing of all the files that it contains. I use the following code to access the contents String files = Directory.GetFiles(path); I can then enumerate through that array to get my listing. However I am trying to set my application up as a service. And now (after calling methods in a thread using the OnStart() method) it says the directory does not exist (I verified this with a...
3
6400
by: Bobby | last post by:
Hi I'm using Access 2003 with SQL server 2000, linked via ODBC. Can anybody tell me how to capture SQL error codes in Access? If this is not possible, is there any way I can simply turn off SQL errors? Can I use docmd.setwarnings false? If so which event would I put it on. On error doesn't seem to work. Thanks
2
2579
by: BD | last post by:
Hi, all. I'm trying to implement a REFRESH IMMEDIATE MQT to help with performance of a particularly sluggish query. I cannot create it with REFRESH IMMEDIATE, because of reason code "10", whatever that is. I am able to implement it with REFRESH DEFERRED, but that's not really suitable. I need to get a handle on these reason codes.
16
11864
by: John | last post by:
I am looking for VBA code that will work with Access 2003 to enable dragging and dropping a file/folder name from Windows XP Explorer into an Access form's text box. This is a common functionality that most Windows programs have, so I'm suprised it's not easier to implement in Access/VBA. Through Google, I found two VB6 examples and one VBA example on the Access Web written by Dev Ashish. The VB6 examples used loops to keep checking...
2
19501
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge. I would be using layman's words, or maybe, my own words as how I understand them, hoping, you will understand it the same way that...
0
10651
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10393
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10405
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10136
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7671
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6893
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5556
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4342
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3020
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.