OLE Link for JPEG Files (1 Viewer)

Colin

New member
Local time
Today, 19:43
Joined
Aug 7, 2000
Messages
7
I am creating a product catalog and can link Bitmap files in a table. The problem is that I would rather Link to (smaller) JPEG files, and I keep getting an OLE error, to the effect that I do not have the right driver installed? My guess is that the bitmap structure is native and covered in some of the default drivers when Access was installed. Any thoughts on how to link JPEG files in a table for use in a From display?
 

adi32

Registered User.
Local time
Today, 19:43
Joined
Dec 6, 2000
Messages
82
I have the same problem
how can i insert a jpeg in a form?
 

Graham T

Registered User.
Local time
Today, 19:43
Joined
Mar 14, 2001
Messages
300
You could try the following.....

How to include a bound picture on form:

While it's possible to actually store the images within the database itself as OLE objects, normally it's not the preferred way. When you embed an OLE object in a table, you're storing a lot of overhead as well. This overhead is the information about the object (such as it's parent application) that Access needs to store in order to render the object properly.

The preferred way to display images is to store the complete path and filename to the actual files themselves within a table, and then use the Image tool (in Access 97/2000) to update the display.

The following example shows you how to display Windows bitmap images, .gif files and .jpg files on a Microsoft Access form without storing the images in a Microsoft Access table.

Creating the Table to Store File and Path Data:


Create a new table that is named Imagetable and then add a text field that is named ImagePath.

Open the Imagetable table in Datasheet view and then add the path and the name of a bitmap file to each record. The following examples show how the records might look:

c:\windows\circles.bmp
c:\Documents and Settings\Graham\Desktop\Temp\switchboard.jpg
c:\windows\tiles.bmp
c:\Documents and Settings\Graham\Desktop\Temp\Graham.gif
c:\windows\bubbles.bmp

Displaying Images in a Form


Use the AutoForm: Columnar Wizard to create a new form that is based on the ImageTable table.

Open the Imageform form in Design view and then add an image control to the form by using the Image tool in the toolbox. You are prompted to select an image to insert. Select any image available on your computer. Name the control ImageFrame.

Set the OnCurrent property of the Imageform form to the following event procedure:

Private Sub Form_Current()
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath]
End Sub


Set the AfterUpdate property of the ImagePath text box to the following event procedure:

Private Sub ImagePath_AfterUpdate()
On Error Resume Next
Me![ImageFrame].Picture = Me![ImagePath]
End Sub


Open the Imageform form in Form view. Notice that the form displays the corresponding bitmap for each record.
Note: You may need to amend the file paths and image names to correspond with images stored on your system.

HTH

Graham
 

adi32

Registered User.
Local time
Today, 19:43
Joined
Dec 6, 2000
Messages
82
U R THE BEST
Thank you very much
the only annoying is the loading bar when loading the pic
 

adi32

Registered User.
Local time
Today, 19:43
Joined
Dec 6, 2000
Messages
82
is it possible to find a fast way to enter the paths in the table?
maybe a button in the form for browsing for the pic
 

Lister

Z Shift
Local time
Tomorrow, 06:43
Joined
Aug 24, 2003
Messages
305
This is the best example of how to call images to a form that I have ever read.
So bloody simple!
Thanks for taking the time to write it up and post it Graham. :)

But as with all things, you solve one problem just to walk into another.

What I am working on is a simple database that will be the back end for part of a website.
And they would like to store images of certain items with their text and price etc.

Now we can link the text/Number fields to the web page (Its ASP with Dreamweaver, HTML is all new to me) but can’t get the images to link, or display or anything for that matter.

Up until I found this post I was having problems just getting an image on a form (well at least that’s sorted).

Can anyone out there help me out? Or point me in the “way of enlightenment”?

Once again thanks for the help Graham, now I don’t look like an idiot.
 

Graham T

Registered User.
Local time
Today, 19:43
Joined
Mar 14, 2001
Messages
300
Lister

I'm not at work right now, but there should be no problem displaying images in the webpage by using the file path in the ASP to the images stored in the web folder.

If you don't get any other responses I'll take a look for this tomorrow.

Graham
 

madEG

Registered User.
Local time
Today, 14:43
Joined
Jan 26, 2007
Messages
309
Raising this thread from the dead... :)

Ok, I have followed/read the above, and am not having much luck.

I am using Access 2003, and would like a form to display the packages embedded in my table. I used this method [ http://support.microsoft.com/kb/198466 ] to embed the jpgs under class Paint.Picture.

...so I reinstalled the OffXP Photo Editor to gain access to an OLE server...

Yet, to see the image, I still need to double click on the form's bound image control area that cycles through the image's filename for each record. (NOTE: after double clicking and launching the 'package' [which is a jpg] I then see an icon, rather than just the filename - not sure if that is relevant.)

When I copy/paste in an image from MS photo and fax viewer, embedding that type of image (rather than the jpg) it works, so I presume my form is set up acceptably.

Unfortunately this db is going to be populated with embedded images from a ID badge making software system (not mine), so I can't link and must embed. I was just hoping to use the embedded jpgs due to the bloat involved with images like bmp.

Should I have just embedded using a different class? I used, as suggested in the above article "Paint.Picture".


Thoughts?

Thanks!
 
Last edited:

madEG

Registered User.
Local time
Today, 14:43
Joined
Jan 26, 2007
Messages
309
Raising this thread from the dead... :)


I am ok with accepting that I "can't get there from here..." -- if this is the case, might someone point me to a method for converting images from packages/jpg to bmps, or something else that will display?

I just need something that will work... :)

Thanks!
 

madEG

Registered User.
Local time
Today, 14:43
Joined
Jan 26, 2007
Messages
309
Well, it seems that the embedding of JPGs didn't want to cooperate with the re-added PhotoEditor from a legacy MSOffice. Oh well :)

Good news is I found a nice freeware app to convert the images to a reasonably sized bmp, from the original jpgs, reimported, and was done with this...

The freeware was called BIMP Lite v1.62. It had a simple mechanism for batch converting/outputting image formats. Problem solved. Just going back to (small) bmps...
 
Last edited:

Sac

Member
Local time
Today, 14:43
Joined
Feb 28, 2020
Messages
48
Hi All,

I am currently working on a way to display four records with its corresponding picture per form. The pictures would be store in a folder instead of the database. This is for a sewer inspection program. I write the inspection in the database. and display it in a form. But when I display pictures (4 per page), I have to do it manually and it is time consuming. I first videotape the sewer and then take the pics through a video capture program. I store this pictures in a folder. My problem is that I would like to click a button to display the observations written in the inspection of the pipe with the corresponding picture. If its more than 4 observations, I would like to display it the second page and so on.. If anyone can help I will appreciate it.

If anybody can help would much appreciated.

Sac
 

Attachments

  • Inspection.jpg
    Inspection.jpg
    196.2 KB · Views: 61
  • ObservationPictures.jpg
    ObservationPictures.jpg
    293.1 KB · Views: 66

Users who are viewing this thread

Top Bottom