The GIF file is actually converted to an Enhanced Metafile by Access
when loaded into an Image control. I ran into this issue several years
ago but honestly have forgotten the workaround.
Convert your GIF to Bitmap format and you will be able to use the code
you posted. If this is not possible/practical then you will have to work
with temp disk files.
Copy the GIF intact to the long Binary field
At runtime copy the contents fo the long Binary field to a temp disk
file. Point the Picture prop of the Image control to this temp disk
file.
It was pseudo code I posted because it is too simple to bother writing
actual code.
To save the PictureData prop:
Me!YourOLEFieldName = Me.ImageControlNamePictureData
To Load:
Me.ImageControlNamePictureData = Me!YourOLEFieldName
You seem to want to use GetChunk which is not required. Just substitute
your Recordset object for "Me" when you do not want to have the
recordset bound to the form containing the Image control.
Good luck.
--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"deko" <de**@hotmail.com> wrote in message
news:I0******************@newssvr21.news.prodigy.c om...
In some versions of Access, the PictureData property is mistaken
marked as hidden in the Type Libary. Open the object Browser window, right
click anywhwere and select Show Hidden Members.
Done. I see PictureData in the Object Browser, but still not in the
property sheet of the control.
Anyhow, even if the PictureData prop does not show within
Intellisense you can still use it directly.
I do see the property in the Intellisense dropdown.
I posted sample code. Did you even try it?
Sample code? You posted sample code? In this thread?
Just for grins, I tried loading the logo into the table field using
that GetBlob function (see pervious reply to rsinclair), and then cleared
the path from the Picture property of the Image control. Then I added
this code to the form module:
Private Sub Image1_Click()
Me!Image1.PictureData = Me!Logo
End Sub
I get: Run-time error 2192: The bitmap you specified is not in a
device-independent (.dib) format.
Is this a result of the way I loaded the logo into the field with
GetBlob, or because the logo is a gif?
If you could repost your sample code, I'm sure that would help.
Thanks.