ACC2: Cannot Embed OLE Objects Using Access Basic CodeID: Q120262
|
Advanced: Requires expert coding, interoperability, and multiuser skills.
You can use Access Basic code to embed one OLE object in a bound control on
a form successfully. However, subsequent OLE objects that you try to embed
with Access Basic code are visible in the form, but are not saved when you
save the record.
You are not moving the focus in your Access Basic code to the OLE controls in which you are trying to embed objects.
Set the focus in your Access Basic code to subsequent OLE controls before saving the record.
This problem no longer occurs in Microsoft Access version 7.0.
Sub Form1_Load
Me![OLE1].SourceDoc = "c:\windows\arcade.bmp"
Me![OLE1].Action = OLE_CREATE_EMBED
Me![OLE2].SourceDoc = "c:\windows\arcade.bmp"
Me![OLE2].Action = OLE_CREATE_EMBED
End Sub
Field '<tablename>.OLE2' can't contain a null value
Sub Form1_Load
Me![OLE1].SourceDoc = "c:\windows\arcade.bmp"
Me![OLE1].Action = OLE_CREATE_EMBED
Me![OLE2].SourceDoc = "c:\windows\arcade.bmp"
Me![OLE2].Action = OLE_CREATE_EMBED
Me![OLE2].Setfocus
End Sub
Microsoft Access "User's Guide," version 2.0, Chapter 19, "Using Pictures,
Graphs, and Other Objects," pages 470-481
Microsoft Access "Building Applications," version 2.0, Chapter 4, "Adding
and Editing Data," pages 64-65
Additional query words: link
Keywords : kberrmsg kbole kbprg
Version : 2.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: April 6, 1999