ACC: Cannot Change RecordsetType Property in Form ViewLast reviewed: August 29, 1997Article ID: Q164095 |
The information in this article applies to:
SYMPTOMSModerate: Requires basic macro, coding, and interoperability skills. The example in the RecordsetType property Help topic implies that you can set the RecordsetType property of a form in the Open event of the form. The example states: In the following example, only if the user ID is ADMIN can records be updated. This code sample sets the RecordsetType property to Snapshot if the public variable gstrUserIDD value is not ADMIN.
Sub Form_Open(Cancel As Integer) Const conSnapshot = 2 If gstrUserID <> "ADMIN" Then Forms!Employees.RecordsetType = conSnapshot End If End SubThis example is incorrect. You can set the RecordsetType property of the form; however, the property has no effect. This article assumes that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to your version of the "Building Applications with Microsoft Access" manual.
RESOLUTIONSet the RecordsetType property of a form by opening the form in Design view, changing the property, and then opening the form in Form view.
Changing the RecordsetType of a Form
MORE INFORMATION
Steps to Reproduce BehaviorCAUTION: Following the steps in this example will modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and perform these steps on a copy of the database.
Keywords : DcmHlp FmsProp Version : 7.0 97 Platform : WINDOWS Hardware : x86 Issue type : kbdocerr |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |