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 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
--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Jozef" <me@you.com> wrote in message news:rY6Mf.2843$Ui.2646@edtnps84...
Hello,
I have some blob code that I use to polulate an OLE field with various
files. Some of the files are images. The information in the field says
"Long Binary Data" regardless of what I am writing to the field. Is there
any way to convert this to Picture?
Thanks!