PRB: Index Does Not Work in Access Basic Function w/ NWIND.MDBArticle ID: Q109318Creation Date: 02-JAN-1994 Revision Date: 19-SEP-1996
The information in this article applies to:
SYMPTOMS
When you run an Access Basic function that has PrimaryKey defined as an
index and that uses the Index method on a table in the sample database
NWIND.MDB, you receive the error message:
'PrimaryKey' isn't an index in this table.CAUSE The PrimaryKey index is incorrectly named Primary Key internally (note the space between "Primary" and "Key") in three tables in NWIND.MDB. These tables are the Products, Shippers, and Suppliers tables.
RESOLUTION When you are running an Access Basic function that uses the Index method on these three tables, refer to the index as "Primary Key" instead of "PrimaryKey."
STATUS This problem no longer occurs in Microsoft Access version 2.0.
MORE INFORMATION NOTE: This article assumes that you are familiar with Access Basic and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information on Access Basic, please refer to the "Introduction to Programming" manual.
Steps to Reproduce Behavior
?NWINDSEEK(1) The above error message displays.
TBL.Index = "Primary Key" The appropriate message box is displayed. |
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.