I'm writing a VB program that writes to an ACCESS database. This database has a picture field called "Picture" (an OLE Object). I'm using DAO to access that database. I open the database, the table, etc. But when I want to add a new record (including the picture) for example, the picture doesn't appear in a form that I created in the database, but the rest of the field are transfered without problems. I'm affraid that I'm not manipulating the picture field properly. I don't want to use the data control just DAO.This is the code. Can you help me? ...Thanks
Dim DB1 As Databse
Dim RS1 As Recordset
Dim WS1 As Workspace
Dim Database1_Path As String
Set WS1 = DBEngine.Workspaces(0)
Set DB1 = WS1.OpenDatabase(Database1_Path)
Set RS1 = DB1.OpenRecordset("Person", dbOpenTable)
RS1.AddNew
RS1("Last_name" = txtDataField(0).Text
RS1("First_name" = txtDataField(1).Text
RS1("Picture" = App.Path + "\visitpic.jpg"
RS1.Update
DB1.Close
Dim DB1 As Databse
Dim RS1 As Recordset
Dim WS1 As Workspace
Dim Database1_Path As String
Set WS1 = DBEngine.Workspaces(0)
Set DB1 = WS1.OpenDatabase(Database1_Path)
Set RS1 = DB1.OpenRecordset("Person", dbOpenTable)
RS1.AddNew
RS1("Last_name" = txtDataField(0).Text
RS1("First_name" = txtDataField(1).Text
RS1("Picture" = App.Path + "\visitpic.jpg"
RS1.Update
DB1.Close