Hi all,
I have made a table like this:
TBLpictures
ID
FLDpath - memo
FLDname - text
FLDpicture - OLE object
now, what I need to do is to make a button that, when I click on it, it looks in a folder "c:\\Pictures" and puts all the pictures into the table.
But I'm stuck at the part where I want to save the OLE-object.
this is my code so far
so does anyone know what I have to do to put in my pictures? plz help
I have made a table like this:
TBLpictures
ID
FLDpath - memo
FLDname - text
FLDpicture - OLE object
now, what I need to do is to make a button that, when I click on it, it looks in a folder "c:\\Pictures" and puts all the pictures into the table.
But I'm stuck at the part where I want to save the OLE-object.
this is my code so far
Code:
Private Sub cmdupdate_Click()
Dim fs, f, f1, fc, s
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim SQLQ As String
SQLQ = "SELECT * FROM tblpictures;"
Set db = CurrentDb
Set rs = db.OpenRecordset(SQLQ, dbOpenDynaset)
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder("C:\\pictures")
Set fc = f.files
For Each f1 In fc
s = f1.Name
rs.AddNew
rs!FLDname= s
rs!FLDpath= "C:\\pictures" & "\" & s
rs!FLDpicture=???????????
rs.Update
rs.MoveLast
Next
MsgBox "finished"
End Sub
so does anyone know what I have to do to put in my pictures? plz help
Last edited: