If thefield in Datasheet view says "Long Binary Data" then you DO NOT have
an OLE object embedded within the field. The field contains plain binary
data which can be anything. Hopefully, the field contains an exact copy of
the original file.
The simplest method is to save the fields contents to a temp file on your
hard drive with the proper Image type file extension(bmp etc.). Then simply
set the Picture property of the standard Image control to the name of this
temp file. Cleanup as required.
Create a form with an OLE Frame control, for this example named
"olePicture", bound to the field in question.
Private Sub cmdSave_Click()
On Error GoTo Err_cmdSave_Click
Dim a() As Byte
Dim lTemp As Long
Dim sl As String
lTemp = LenB(Me.olePicture.Value)
ReDim a(0 To lTemp -1)
' Copy the contents of the OLE field to our byte array
a = Me.olePicture.Value
sl = "OLEfieldTestImage" & ".BMP"
Open sl For Binary Access Write As #1
Put #1, , a
Close #1
Exit_cmdSave_Click:
Exit Sub
Err_cmdSave_Click:
MsgBox Err.Description
Resume Exit_cmdSave_Click
End Sub
You can also accomplish this without creating the temp disk file but it
involves a lot of API calls. There is code on my site to do just this
though.
--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.