ACC97: Can't Update Recordset After Refreshing Linked Table
ID: Q165352
|
The information in this article applies to:
SYMPTOMS
Novice: Requires knowledge of the user interface on single-user computers.
After you refresh the link to a linked table by using the Linked Table
Manager Wizard, you cannot update the data in a form based on the linked
table the first time that you open the form. You receive a message that you
cannot update the data.
RESOLUTION
This behavior only occurs if:
- You use the Linked Table Manager to refresh the link to a linked
table.
- You open a form based on the linked table that has its RecordsetType
property set to Snapshot.
- You open another recordset based on the same table using a form or
Visual Basic code and try to add or update a record.
To resolve this problem, close all recordsets based on the table, and then
reopen them. For example, close the form with the snapshot-type recordset,
close the form with which you are trying to update the recordset, and then
reopen them both.
STATUS
Microsoft has confirmed this to be a problem in Microsoft Access 97.
MORE INFORMATION
If you try to update data using a form, you receive the message:
This Recordset is not updatable.
If you try to update data using Visual Basic code, you receive the message:
Run-time error '3027':
Can't update. Database or object is read-only.
This problem occurs the first time you open the form with the snapshot-type
recordset and try to update the recordset while the form is open. This
includes updating the table directly or using a form or Visual Basic code.
Even if you have previously edited the data or if you quit and restart
Microsoft Access, the first time you open the snapshot-type form this
behavior is exhibited.
Steps to Reproduce Problem
- Start Microsoft Access and create a new database named TestUpdate.mdb.
- On the File menu, point to Get External Data, and then click Link
Tables.
- In the Link dialog box, locate and select the sample database
Northwind.mdb, and then click Link.
- In the Link Tables dialog box, select the Customers table, and then
click OK.
- Create a new form based on the linked Customers table using the
AutoForm: Columnar Wizard.
- Switch the form to Design view.
- Set the form's RecordsetType property to Snapshot.
- Save the form as frmReadOnly, and then close it.
- Use the AutoForm: Columnar Wizard to create another new form based on
the Customers table.
- Save the form as frmUpdate, and then close it.
- On the Tools menu, point to Add-Ins, and then click Linked Table
Manager.
- In the Linked Table Manager dialog box, click to select the check box
next to the Customers table, and then click OK.
- Click OK when you receive the message that the table was successfully
refreshed, and then click Close in the Linked Table Manager dialog box.
- Open the frmUpdate form, change some data, and then close the form.
- Open the frmReadOnly form, and then minimize it.
- Open the frmUpdate form again and try to update a record. Note that you
receive the message "This Recordset is not updatable." If you close
both forms and reopen them, you will be able to update data using the
frmUpdate form.
REFERENCES
For more information about Snapshot-type recordsets, search the Help Index
for "snapshot-type Recordset objects."
Additional query words:
attach attached
Keywords : kberrmsg IsmProb
Version : 97
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: May 13, 1999