I am trying to embed an OLE object in one of the fields of a table using code in a module. I have done this from a form before, but don't know how to do it in this context. The only thing i've found is shown below (given that i have a field called Jpeg which takes OLE objects);
Dim rstMain As DAO.Recordset
Set rstMain = CurrentDb.OpenRecordset("tblMain"
With rstMain
.AddNew
!Field1 = "New Data"
!Field2 = "More New Data"
!Jpeg.CreateEmbed "C:\Windows\Circles.jpg"
End With
rstMain.Close
but .CreateEmbed threw up the error "Method or Data Member not found". Any ideas what i need to do? By the way, i am using Access 2000.
Thanks in advance for your help,
Rob
Dim rstMain As DAO.Recordset
Set rstMain = CurrentDb.OpenRecordset("tblMain"
With rstMain
.AddNew
!Field1 = "New Data"
!Field2 = "More New Data"
!Jpeg.CreateEmbed "C:\Windows\Circles.jpg"
End With
rstMain.Close
but .CreateEmbed threw up the error "Method or Data Member not found". Any ideas what i need to do? By the way, i am using Access 2000.
Thanks in advance for your help,
Rob