loading a picture

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a continious form where I want to display a linked picture (OLE type)
but the first picture shows up for every one. In the on open property I have:

Dim destination As String
destination = "C:\Documents and Settings\Administrator\Desktop\" &
Me.picName & ".bmp"
Me![Image196].Picture = destination

Where should I put this code so that my picture will be displayed
 
Dan said:
I have a continious form where I want to display a linked picture (OLE type)
but the first picture shows up for every one. In the on open property I have:

Dim destination As String
destination = "C:\Documents and Settings\Administrator\Desktop\" &
Me.picName & ".bmp"
Me![Image196].Picture = destination

Where should I put this code so that my picture will be displayed

The Current event fires as you change records. That's where your code should
be.
 
It is a continious form. I need it to display several different pictures all
at the same time, one for each record. It is kind of like thoes dating sites
where you can search through all of their members and look at each persons
picture by just scrolling down to the next one.
 
also my front end just jumped in size after I put thoes pictures in. Since
they are just linked pictures is there anyway to delete them when you close
the form so the size will be reduced?
 
Associate the picture link to the record, in the table. Then pull it up when
you display the data on the form.

Sharkbyte
 
Dan said:
It is a continious form. I need it to display several different pictures all
at the same time, one for each record. It is kind of like thoes dating sites
where you can search through all of their members and look at each persons
picture by just scrolling down to the next one.

You have to use a bound object frame for that rather than an image control and
yes storing images in your database (even linked) will bloat your database in a
hurry and it is not recommended.
 
Ok, I have the link to the file stored in the query and I put the bound
object frame on my form with the control source set to the pictures link.
When I open the form nothing happens, I the bounded object frame is blank. If
you double click on it it says "A problem occurred whle myDatabase was
communicating with the OLE server or ActiveX control. Close the OLE server
and restart it outside of myDatabase. Then try the orriginal operation again
in myDatabase.

How would I do this and does it sound like its working (after I do what it
says)?

Is there any way to make it so that you don't have to double click on the
file?
 
Dan said:
Ok, I have the link to the file stored in the query and I put the bound
object frame on my form with the control source set to the pictures link.
When I open the form nothing happens, I the bounded object frame is blank. If
you double click on it it says "A problem occurred whle myDatabase was
communicating with the OLE server or ActiveX control. Close the OLE server
and restart it outside of myDatabase. Then try the orriginal operation again
in myDatabase.

How would I do this and does it sound like its working (after I do what it
says)?

Is there any way to make it so that you don't have to double click on the
file?

What kind of files? Bit-Maps work the best, but I believe other types can be
used. I seem to remember some type of issue with JPegs. The error you get when
you double-click suggests that you have an OLE problem. Realize that Access
itself doesn't render the image. It requires OLE to get another program on your
system to render the image inside of the object frame. If it can't find or
communicate properly with such a program then it doesn't work.
 
The files are bitmaps and what is wierd is that I still have the old pictures
on the form and they are linked to the same file name and they load just fine
 
Back
Top