ACC1x: "Fieldname" Is Not an Index in This TableLast reviewed: June 8, 1997Article ID: Q97001 |
The information in this article applies to:
SYMPTOMSWhen you run an Access Basic function that attempts to perform a Seek method on a table, you receive the following error message
'<Fieldname>' isn't an index in this table.where <Fieldname> is the name of a field in your table that has been defined as an index in your function. This field is also the primary key in the table.
CAUSEWhen you set the Index property in your function and you are referring to a primary key field, you should refer to the field as PrimaryKey; that is, do not refer to the field by the name of the field.
RESOLUTIONChange the statement in your function that sets the current Index property. The correct syntax should resemble the following:
EMPTable.Index = "PrimaryKey" MORE INFORMATIONThe following example is based on the sample database NWIND.MDB:
Steps to Reproduce Behavior
REFERENCESMicrosoft Access "Introduction to Programming," version 1.0, page 114
|
Additional query words: seek find
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |