Reads a BLOB from a disk file and stores the contents in the specified table and OLE-type field.
The specified table with the OLE object field to contain the binary data must be open and the correct record navigated to prior to calling the ReadBLOB() function.
Returns the number of bytes read from the Source file.
The path and filename of the binary information to be read and stored
The ADO recordset (based on a table) to store the data in
The name of the field to store the data in
Dim ID As Long Dim recs As New ADODB.Recordset Dim dbs as DAO.Database Set dbs = CurrentDb() recs.Open "SELECT * FROM xf_tblDocStore", Application.CurrentProject.Connection, adOpenDynamic, adLockOptimistic, adCmdText recs.AddNew recs!DocOrigName = "Affirmative_Action.pdf" xf.Interact.StoreBLOB Application.CurrentProject.path & "\Affirmative_Action.pdf", recs, "DocImage" recs.Update ID = recs!Doc_ID recs.Close Set recs = Nothing Debug.Print "StoreBLOB: Doc copied to table: id=" & ID