UpdateOptions Property

UpdateOptions Property

See Also                  Applies To

You can use the UpdateOptions property to specify how a linked OLE object is updated.

Setting

The UpdateOptions property uses the following settings.

Setting Visual Basic Description
Automatic acOLEUpdateAutomatic (0) (Default) Updates the object each time the linked data changes.
Manual acOLEUpdateManual (2) Updates the object only when the control's Action property is set to acOLEUpdate or the link is updated with the OLE/DDE Links command on the Edit menu.

You can set the UpdateOptions property in a property sheet, in a macro, or by using Visual Basic. You can set the default for this property by using a control's default control style or the DefaultControl method in Visual Basic.

The UpdateOptions property setting is also available through the OLE/DDE Links command on the Edit menu.

Remarks

Normally, the object is updated automatically whenever the linked data changes, but you can tell Microsoft Access to update the data only when it receives a specific instruction to do so. For example, if other users or applications can access or change linked spreadsheet data on a form, you can use this property to specify that the linked data only be updated when the database is opened in single-user mode.

When the UpdateOptions property is set to Manual, updates don't occur based on the setting of the Refresh Interval box on the Advanced tab of the Options dialog box, available by clicking Options on the Tools menu.

Note   When an object's data is changed, the Updated event occurs.

The following example sets the UpdateOptions property for an unbound object frame named OLE1 to update manually, and then uses the Action property to force an update of the OLE object in the control.

OLE1.UpdateOptions = acOLEUpdateManual
OLE1.Action = acOLEUpdate