I want to be able to import images into my database. I have been successful in setting up an OLE box that allows me to copy&paste an image into the field. However, I have not been able to save that image to a database via ADO. I have been trying to save it like I would save text:
Dim con as New ADODB.Connection
Dim rst as New ADODB.Recordset
set con = CurrentProject.Connection
Set rst = New ADODB.Recordset
rst.open "SQL",etc.
rst.AddNew
Me.OLEImage = rst.Fields("OLEfield")
rst.update
rst.close
etc.
I do not understand why this does not work. I have been able to use images when using no code (having Access' arrows on the bottom to move around), but I require the use of ADO to save/etc.
Does anyone have any suggestions on how to do this, where to go to find out more? I have searched for the past two weeks on the internet, but have not found anything that works. Just some VB6 code that references ADO Control something (I know VBA fairly well, but still more to learn).
Any suggestions would be great!
Thanks!
John
Dim con as New ADODB.Connection
Dim rst as New ADODB.Recordset
set con = CurrentProject.Connection
Set rst = New ADODB.Recordset
rst.open "SQL",etc.
rst.AddNew
Me.OLEImage = rst.Fields("OLEfield")
rst.update
rst.close
etc.
I do not understand why this does not work. I have been able to use images when using no code (having Access' arrows on the bottom to move around), but I require the use of ADO to save/etc.
Does anyone have any suggestions on how to do this, where to go to find out more? I have searched for the past two weeks on the internet, but have not found anything that works. Just some VB6 code that references ADO Control something (I know VBA fairly well, but still more to learn).
Any suggestions would be great!
Thanks!
John