ACC: Error Message Adding Record to SubformLast reviewed: May 7, 1997Article ID: Q123653 |
The information in this article applies to:
SYMPTOMSModerate: Requires basic macro, coding, and interoperability skills. When you try to add a new record to a subform, you receive the following error message:
In Microsoft Access 97: An error occurred while referencing the object. You tried to run a Visual Basic procedure that improperly references a property or method of an object. In Microsoft Access 7.0: An error occurred while referencing the OLE Automation object. You tried to run a Visual Basic procedure that improperly references a property or method of an OLE Automation object. In Microsoft Access 1.x or 2.0: Can't set value. CAUSEThis error can occur if the subform's LinkChildFields property contains the name of a form property.
RESOLUTIONChange the name contained in the subform's LinkChildFields property and the name of the associated field in the underlying table to something other than the name of a form property.
MORE INFORMATIONWhen you add a record to a linked subform, Microsoft Access sets the value from the field on the main form specified in the subform's LinkMasterFields property to the field on the subform specified in the subform's LinkChildFields property. If the field specified in the LinkChildFields property is the name of a form property, Microsoft Access tries to set the value of that property for the form instead of the field. Note that this behavior is normal, and the values will therefore update normally after displaying the error.
Steps to Reproduce Behavior
REFERENCESFor more information about the LinkChildFields and LinkMasterFields properties, search the Help Index for "LinkChildFields," or ask the Microsoft Access 97 Office Assistant.
|
Additional query words: setvalue
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |