Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link to images

Status
Not open for further replies.

ashows

MIS
May 10, 2002
25
US
I am creating a db of information and pictures of various properties (houses). There is a maximum of 6 pictures for each property. I'm trying to link to the images, but it appears that they are still being embedded in the db.

Currently, I'm using a bound OLE object frame to display the pictures. When I insert an image into the frame, I select "Create from file" and put a check mark in the "Link" box. The original db size w/ no pics is 1 MB but it increased to 3.8 MB after adding online one image.

How do I create a *link* to the images instead of embedding them?

For each image the user needs to be able to click a command button on the form, then browse his computer for the correct file and have the image displayed on the screen.

Thanks!
 
There are several ways to do this. IMHO the best is to just store the path of the picture in the database and not use OLE fields.
To show the pictures on the report or form, put an empty picture frame on the form, then on the forms OnCurrent Event put:

Me![ImageFrame].Picture = Me![ImagePath]

where Imageframe is the name of the picture frame and ImagePath is the name of the field with the path to the image.

In reports put it on the OnFormat event.

HTH

Ben ----------------------------------
Ben O'Hara
bo104@westyorkshire.pnn.police.uk
----------------------------------
 
I am just completing a database that does just that, I have reduced 423 MB of files down to 23 MB. It should be finished , less error trapping tomorrow.

If you want a copy send me your e mail address

Regards Neil Berryman
IT Trainer
neil_berryman@btopenworld.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top