First Published 5 Sept 2023 Last Updated 31 Aug 2024
This is an extended version of an article originally written for the Access Forever website earlier this year.
Access provides a long list of about 3000 error messages when there are issues with your code. Some are relatively common whilst others are very obscure.
Nobody likes seeing error messages. But when you do, you want the error message to be clear and to the point.
In most cases, the error message IS helpful in solving the problems with your code.
However, very occasionally you may see a very unhelpful error message similar to this:
This type of message is both unclear and unhelpful in resolving the problem. The reason is that such messages should never actually be seen by end users.
In fact, any message like this is effectively a bug and the Access team want to know so they can try and fix it if possible.
If you do see a reserved error message similar to this, please contact me using the form below giving the precise circumstances (including Access version and bitness) where it occurs and I will be happy to report the bug on your behalf.
Between you, me and the Access team, we can hopefully eradicate these reserved error messages in the coming months.
NOTE:
1. The reserved error number will vary but is ALWAYS less than zero.
2. Please include the reserved error number as part of your feedback.
Here are details of 10 reserved errors that I have already reported. It is likely that there are other such errors lurking in cyberspace.
Many (but not all) appear to be associated with corruption and/or linked tables.
Please pass on sufficient details so that the Access team can reproduce and hopefully fix the error.
Thanks in advance for your feedback!
Reserved Errors and their Meanings
I am very grateful for the very useful information received from members of the Access team to help compile the following information:
a) Error -1001
Trying to save a query that contains a reserved word (e.g. Language) in SQL view, causes reserved error -1001 and the field affected is highlighted
Despite this the query can be opened in design view and run without error.
The error is easily fixed by enclosing the field name(s) containing reserved words in square brackets e.g. [Language].
UPDATE 30 Sept 2023:
A member of the Access team has investigated this and pointed out that the error only occurs when the option to use SQL Server compatible syntax (ANSI-92)
is enabled in Access Options . . . Object Designers.
However, a clear error message would have been far more helpful. For example, something like this:
You are using SQL Server compatible syntax (ANSI-92) and tried to save a query containing a reserved word, Language, in SQL view.
To fix this error, do one of the following: disable SQL Server compatible syntax, enclose the field name in [] brackets or rename the field.
NOTE: This error was fixed in Access 365 version 2311 Nov 2023
b) Error -1104
An old Access forum thread from 2017 described users experiencing reserved error -1104 when navigating through a database
Unfortunately, I have not been able to get any further information on this error
c) Error -1517
If an MDB file contains a table with a corrupted record, trying to save as ACCDB triggers reserved error -1517 as shown below
d) Error -1524
Reserved error -1524 can occur in certain types of corruption where a text field has an odd number of bytes stored.
A member of the Access team has explained this error as follows:
Text in Access is encoded in UTF-16, which uses either 2 or 4 bytes for each character.
Error -1524 indicates that there is a text field that has an odd number of bytes stored, which is not valid for a UTF-16 string.
Most UTF-16 characters are encoded with 16 bits, but since that doesn’t provide enough characters to encode all the potential symbols in some locales, sometimes 32 bits
are used.
NOTE:
It would appear that most of the reserved errors in the range
-1500 to -1599 relate to unexpected problems with database structure, often resulting in corruption.
e) Error -2037
An Access forum thread from 2020 described users experiencing reserved error -2037 when trying to run queries based on linked tables.
Unfortunately, I have not been able to get any further information on this error
f) Error -3001 Added 31 Aug 2024
This error occurs when query SQL with a comment added as part of the new Monaco SQL Editor feature is opened in an older version of Access that does not support the
feature. The issue has been reported and it is important that it is fixed to allow for backward compatibility.
g) Error -3034
Repairing a database after receiving a 2501 error when using SendObject to email a PDF file triggered reserved error -3034.
In this case, error handling was in use and the standard Access error 3000 is also shown in the error message:
For info, there are two standard Access errors (2626 & 3000) intended to handle these reserved errors:
h) Error -3087
The deep hidden attached tables associated with a complex datatype field cannot be viewed directly or indirectly using a query.
Attempting to run a query on a complex attached table containing column history in memo (long text) fields causes reserved error -3087
i) Error -3211 Added 24 Aug 2024
MSysResources is a complex system table which holds details of shared images used in the Image Gallery.
The images are stored as attached files and duplicates often occur with names starting 1_... or 2_... etc.
The table can be successfully edited manually.
However, reserved error -3211 occurs when attempting to use this delete query to remove selected records from the MSysResources system table.
DELETE MSysResources.*, Mid([Name],2,1) AS Expr1 FROM MSysResources WHERE (((Mid([Name],2,1))="_"));
Apparently the -3211 error means that an unexpected situation was encountered when trying to expand an UPDATE or DELETE query.
This simplified version of the query successfully deletes the unwanted duplicates without triggering the error.
DELETE MSysResources.* FROM MSysResources WHERE (((Mid([Name],2,1))="_"));
The only change made was to remove the superfluous Expr1 field added by the Access query designer
j) Error -7713
Viewing a large linked SQL Server table in a datasheet triggers reserved error -7713 after about one minute or when navigating to the last record.
After clicking OK in the message box, all values in all columns show as #Name and from there the users are no longer able to view the data.
All the data is visible when the datasheet view is first opened.
Another report of this error at an Access forum also describes this happening when a linked SQL table is left open for some time.
Apparently, the -7713 error indicates that the SQL ODBC driver returned SQL_INVALID_HANDLE.
This suggests that the end user is trying to reference a connection that has been closed.
UPDATE: 6 June 2023
The Access team have so far been unable to reproduce this issue. Can anyone forward an example app to me that exhibits this behaviour?
k) Error -7745
Reserved error -7745 was recently reported in this thread at the MS Answers forum:
Reserved error -7745 in Access when importing from ODBC - Microsoft Community
In this case the error was related to the use of an unrecognised ODBC driver for linking MySQL tables.
This resulted in an unexpected SQL_ERROR response from a call to the SQLStatistics function.
In general, reserved errors beginning with -77 are due to ODBC connection issues e.g. -7713, -7745, -7747
l) Error -7747
Until recntly, relinking a SQL Server table containing a Spatial Index triggered reserved error -7747
NOTE: This error was fixed in Access 365 version 2305
Suggested New Error Messages
Based on feedback from members of the Access team, I have suggested that the reserved errors be replaced with standard error messages with these error descriptions.
[%1], [%2] etc designate parameters that would be specified for each specific error.
Reserved Error | Suggested Error Description | Fixed? |
---|---|---|
-1001 | You are using SQL Server compatible syntax (ANSI-92) and tried to save a query containing a reserved word [%1] in SQL view. Previous workrounds: disable SQL Server compatible syntax or enclose the field name in [] brackets or rename the field |
Yes Version 2311 - Nov 2023 |
-1104 | Invalid session handle | Not yet |
-1517 | You tried to convert an MDB file containing a table with a corrupted record to ACCDB format. Fix the corrupted data and try again | Not yet |
-1524 | The data in record [%1] of field [%2] contains an incorrect number of bytes and is now corrupted. Fix the corruption | Not yet |
-2037 | There was an error when running a query on the linked table [%1]. Try relinking the table | Not yet |
-3001 | You used query SQL with a comment in an older version of Access that does not support this feature | Not yet |
-3034 | You tried to repair a database after cancelling an email SendObject action | Not yet |
-3087 | You attempted to query the attached system table associated with a complex datatype field | Not yet |
-3211 | You attempted to use a delete query to edit a complex system table with attached files | Not yet. Workaround available |
-7713 | The SQL ODBC driver returned an error as the connection has been closed | Not yet |
-7745 | You are attempting to use an unrecognised ODBC driver to connect to a MySQL ODBC table. Reconect using a different ODBC driver. | Not yet |
-7747 | You tried to relink a SQL Server table containing a spatial index. | Yes Version 2305 - May 2023 |
Feedback
Please use the contact form below to let me know whether you found this article interesting/useful or if you have any questions/comments.
Please also consider making a donation towards the costs of maintaining this website. Thank you
Colin Riddington Mendip Data Systems Last Updated 31 Aug 2024
Return to Access Blog Page
|
Return to Top
|