Displaying an ole object in Access Form

  • Thread starter Jeffri Cox \(Newsgroups\)
  • Start date
J

Jeffri Cox \(Newsgroups\)

I am trying to create a field that will show a picture on a form.

I am trying to link to a file rather than embedding the picture into the
database.

I have a text field with the path to the file and I have a object field to
store the picture.

My image field shows the file name not the actual image. When I double click
the object the image will open.

How to I show the picture and have it linked to my field showing the file
path?

Jeff
 
M

MacDermott

Unless you have only a very few records, it's generally a bad idea to embed
pictures in Access OLE fields.
Even "linked" OLE objects are stored as bitmaps in the database, causing
bloat.
As long as you are only displaying one record at a time, a good way to do
this is to store the path to the picture file (as you are apparently already
doing.)
If your path is in a field named MyPath, and you want to display it in an
unbound Image Control named MyImage, you can put code like this in your
form's OnCurrent event procedure:
MyImage.Picture=MyPath

HTH
- Turtle
 
L

Larry Linson

The sample databases at http://accdevel.tripod.com illustrate three
approaches to handling images in Access, and the download includes an
article discussing considerations in choosing which approach to use.

Larry Linson
Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top