ACC2: Incorrect FindFirst Example in "Building Applications"Last reviewed: April 2, 1997Article ID: Q121838 |
The information in this article applies to:
SYMPTOMSModerate: Requires basic macro, coding, and interoperability skills. Page 256 of the Microsoft Access version 2.0 "Building Applications" manual contains an example of using the FindFirst and FindNext methods to locate all records satisfying a particular criterion. However, if you re-create and run this example, you will receive the following error message:
Invalid Operation. CAUSEThis error occurs because the example contains an error. The example uses the OpenRecordset method to open the Employees table as a table-type Recordset object, but the FindFirst method is not available with table-type Recordset objects.
RESOLUTIONChange the line in the example that reads
Set MySet=MyDB.OpenRecordset("Employees")to the following line:
Set MySet=MyDB.OpenRecordset("Employees",DB_OPEN_DYNASET) STATUSThis behavior no longer occurs in Microsoft Access version 7.0.
REFERENCESFor more information about the OpenRecordset method, search for "OpenRecordset," and then "OpenRecordset Method (Data Access)" using the Microsoft Access Help menu. Microsoft Access "Building Applications," version 2.0, Chapter 11, "Working with Sets of Records," pages 256-257 For more information about documentation corrections, view the topic "Documentation Updates" in the Microsoft Access 2.0 ACREADME.HLP file.
|
Additional query words: kberrmsg
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |