Colin
08-07-2000, 05:09 AM
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
10-02-2002, 10:53 PM
I have the same problem
how can i insert a jpeg in a form?
Graham T
10-03-2002, 03:30 AM
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
10-03-2002, 11:58 PM
U R THE BEST
Thank you very much
the only annoying is the loading bar when loading the pic
adi32
10-05-2002, 05:04 AM
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
01-15-2004, 12:45 PM
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
01-15-2004, 01:12 PM
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
09-07-2007, 08:32 AM
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!
madEG
09-07-2007, 08:37 AM
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
09-10-2007, 06:04 AM
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...