Table of contents
Collapse the table of content
Expand the table of content

BoundObjectFrame.OLEType Property (Access)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

You can use the OLEType property to determine if a control contains an OLE object, and, if so, whether the object is linked or embedded. Read/write Byte.


expression. OLEType

expression A variable that represents a BoundObjectFrame object.


The OLEType property uses the following settings.

LinkedacOLELinkedThe control contains a linked object. All the object's data is managed by the application that created it.
EmbeddedacOLEEmbeddedThe control contains an embedded object. All the object's data is managed by Microsoft Access.
NoneacOLENoneThe control doesn't contain an OLE object.

When creating an OLE object, use the OLETypeAllowed property to determine what type of object a control can contain.


The following example illustrates how to display the Insert Object dialog box and how to display an error message if the Cancel button in the Insert Object dialog box is clicked.

Sub InsertObject_Click() 
 Dim conUserCancelled As Integer 

 ' Error message returned when user cancels. 
 conUserCancelled = 2001 
 On Error GoTo ButtonErr 
 If OLE1.OLEType = acOLENone Then 
 ' No OLE object created. 
 ' Display Insert Object dialog box. 
 OLE1.Action = acOLEInsertObjDlg 
 End If 
 Exit Sub 

 If Err = conUserCancelled Then ' Display message. 
 MsgBox "You clicked the Cancel button; " _ 
 &; "no object was created." 
 End If 
 Resume Next 
End Sub

See also


BoundObjectFrame Object

© 2018 Microsoft