ACC: Parameter Query Returns No Records w/ Replication ID FieldID: Q169955
|
Moderate: Requires basic macro, coding, and interoperability skills.
When you run a query based on a table that contains an AutoNumber field,
and the field size of the AutoNumber field is set to Replication ID, no
records are returned.
The query is using an implicit parameter for criteria on the AutoNumber field, and the AutoNumber field is not indexed.
There are two methods to work around this problem. You can create an index on the AutoNumber field in the table, or you can explicitly define the parameter within the query.
Parameter Data Type
------------------------ --------------
[Forms]![Form1]![Field1] Replication ID
Microsoft has confirmed this to be a problem in Microsoft Access 7.0 and 97.
Table: Table1
--------------------------
Field Name: Field1
Data Type: AutoNumber
Field Size: Replication ID
Indexed: No
Field Name: Field2
Data Type: Text
Field Size: 50
Indexed: No
Query: Query1
----------------------------------
Type: Select Query
Field: Field1
Table: Table1
Criteria: [Forms]![Form1]![Field1]
Field: Field2
Table: Table1
For more information about Replication ID AutoNumbers, search the Help Index for "Replication IDs, AutoNumber fields" and then select "AutoNumber fields and replication."
Keywords : QryParm
Version : 7.0 97
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: April 29, 1999