ACC: Append Query Causes Divide ErrorID: Q177102
|
Moderate: Requires basic macro, coding, and interoperability skills.
When you run an append query, you may receive one of the following error
messages:
If you are using Microsoft Access 7.0, you receive the following message when you click Details:This program has performed an illegal operation and will be shut down. If the problem persists, contact the program vendor.
If you are using Microsoft Access 97, you receive the following message when you click Details:MSACCESS caused a divide error in module MSJT3032.DLL
MSACCESS caused a divide error in module MSJET35.DLL
An application error has occurred and an application error log is being generated.
MSACCESS.exe Exception: divide by zero
The append query contains a join to a field in another query whose UniqueValues property is set to Yes. For example, the append query may be based on a table that is joined to a select query whose UniqueValues property is set to Yes in order to limit the data that is appended.
When creating an append query, do not use a join to a query whose UniqueValues property is set to Yes. Set the UniqueValues property of the select query to No, and then set the UniqueValues property of the append query to Yes. Instead of using a select query, you may also want to consider using the source table of the select query, and then setting the UniqueValues property of the append query to Yes.
Microsoft has confirmed this to be a problem in the Microsoft Access versions 7.0 and 97.
Table: tblDivideError1
---------------------------
Field Name: ID
Data Type: Number
Field Size: Long Integer
Field Name: TextName
Data Type: Text
Field Size: 50
Table Properties: tblDivideError1
---------------------------------
PrimaryKey: ID
Close and save the table.
ID TextName
-- --------
1 Test
2 Test
3 Test
4 Test
5 Test
Table: tblDivideError3
---------------------------
Field Name: ID
Data Type: Number
Field Size: Long Integer
Field Name: AltID
Data Type: Number
Field Size: Long Integer
Table Properties: tblDivideError3
---------------------------------
PrimaryKey: ID
ID AltID
-- -----
1 2
2 3
3 5
4 5
Query: qryDivide1
-------------------------
Type: Select Query
Field: AltID
Table: tblDivideError3
Query Properties
------------------
Unique Values: Yes
>
Query: qryDivideAppend
---------------------------------------------
Type: Append Query
Join: tblDivideError1.ID <-> qryDivide1.AltID
Field: ID
Table: tblDivideError1
Field: AltID
Table: qryDivide1
Query Properties
----------------------------------
Destination Table: tblDivideError2
For more information about the UniqueValues property, search the Help Index for "UniqueValues property."
Additional query words: crash fail
Keywords : QryAppnd
Version : WINDOWS:7.0,97
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: May 13, 1999