Have you checked the help file on the .PictureData property? I don't believe
this is what you want... it is used for transferring properties from one
object to another and doesn't seem to have a place in your situation.
The .Picture property takes a String datatype... ex.
"C:\SomeFolder\SomeFile.bmp" If you are getting a type-mismatch then you are
not supplying it with a string value. What is the value of
rsForm!icon.Value? For the record, icon may be a reserved word (not sure on
this, but I'd avoid using any word that has meaning aside from your control.
Maybe you should prefix it with "img" or "ctl" or something).
Also, you should make sure the PictureType property is set to Linked rather
than Embedded.
--
Jack Leach
www.tristatemachine.com
"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
"Brian H" wrote:
> Hi Jack Thanks for trying, but...
>
> setting TestPic.PictureData = rsForm!icon.Value
> seems to load somthing but does not display an image!
>
> setting TestPic.Picture = rsForm!icon.Value
> results in a Type mismatch
>
> Pretty sure there are no typo's
>
> "Jack Leach" wrote:
>
> > AFIAK, to display an image in a standard picture control, it does not need to
> > be a DIB format file.
> >
> > You first reference the .PictureData property, then the .Picture property...
> > did you perhaps have a typo? Have you tried setting the .Picture property
> > with the field value rather than the PictureData property?
> >
> > As a side note, I generally always store the image in a folder (either the
> > BE folder or FE app folder depending on the nature of the image) and set the
> > Picture property of the image control to the path of the file.
> >
> > hth
> > --
> > Jack Leach
> > www.tristatemachine.com
> >
> > "I haven''t failed, I''ve found ten thousand ways that don''t work."
> > -Thomas Edison (1847-1931)
> >
> >
> >
> > "Brian" wrote:
> >
> > > I am trying to set an image dynamically at runtime. I have several images
> > > stored in a table using a single attacment per record.
> > > I can already determine the correct image and retreive it's data using :
> > > rsForm.Fields("Images").Value
> > > however when i try to set the image to this:
> > > imgTestPic.PictureData = rsForm.Fields("Images").Value
> > > i get the following error: 2192: The bitmap you specified is not in a
> > > device-independent bitmap (.dib) format.
> > > I can however set the image to an external file:
> > > imgTestPic.Picture = "C:\testicon.ico" so the setting works.
> > > So how do i convert my stored Imagge bitmap to a DIB???
> > > Geatly appreciate any assistance...
> > >