OLE Object: Not embedding Pictures

G

Guest

Hello.
I am using Access 2000 and Access 2002 and I am having trouble embedding
pictures into the database.
I have created a table with a couple of text fields and an OLE Object field.
Then I created a form and added the text fields and the OLE Object field,
then I right clicked on the OLE Object field and clicked on "Insert Object",
then "Create from file", then I browsed for the pic and clicked OK twice but
then instead of bringing in the picture so that I can see it on the form it
only shows the file name. How do I change this so that when I go from record
to record on the form I can see the corresponding picture and not the file
name i.e. 100_1796.jpg
Your help is greatly appreciated.

Iram/mcp
 
G

Guest

Hi Iram

This is a cut and paste of a previous answer on the same subject.

________________________________

Are you sure you want to "insert" (embedd) insead of "linking" - .

If you do want to "insert" then instead of using a JPEG you would be much
better to using wmf (Windows Meta File) format for access OLE fields. If you
only have a few pictures you can embed them but if you have many (to reduce
the d base size) try linking them - use the link file on the properties box
on form design

The method shown on the MS website is to "link" pictures but if you really
want to embed your pictures (remember that this will enlarge the file size of
your DB).

Make copies of the pictures you want to link to your records (on C Drive /
hard disk) and save them as
ThumbnailPicture1,
ThumbnailPicture2,
ThumbnailPicture3,
etc, (or use the ID of the record in the table)

If you have a picture processing programme such as Photoshop or Photopaint
then use that to resample and convert. If you don’t have one of these
programmes:

1 Click start
2 Click My Pictures (if that’s where they are)
3 Right click the picture and select “Open Withâ€
4 Select Windows Office Picture Manager
5 After the picture is open click the Picture Menu then select Resize
6 Resize your picture to the correct size
NOTE. You will need to know the pixel size of your OLE box see below
7 SaveAS a copy of the original (DON’T JUST SAVE or you will ruin the
original picture)

WMF = Windows Metafile is the best option
BMP = Windows Bitmap is also a good option
GIFF CompuServe Bitmap is also OK
JPEG’s “will†work but they are not really meant for this type of application
TIFF’s are not supported by most access versions.

Create an OLE field in the table (use this OLE field on your form if you
wish to display the picture on a form with a particular record)


To link your picture thumbnail with the OLE
8 Open the Table that will hold the data /picture (not the form)
9 navigate to the OLE field on the correct record and Right Click
10 Select Insert Object
11 Select Create From File and then Bitmap and then check the Link option
12 Browse to your picture and select it
13 Click OK
14 “Package†will appear in the field
15 View your image on the form


Some notes on the size of your OLE object – regardless of what anyone will
tell you (and some answers on this forum ??) there is no way of converting
pixels to cm’s – which is what your OLE object will be sized in, UNLESS you
know the size of each pixel or even the screen resolution and as screens are
all different sizes and resolutions this simply isn’t possible here, so I
have given the APPROXIMATE conversions here you will have to gig about with
your thumbnail until it fits your OLE. Better still save all the thumbnails
as size that you’re happy with and resize your OLE to fit this.

On a screen resolution of 1024 Pixels X 768 (this is standard High Res for a
lap top)
5mm = 118 Pixels or 14.173 Points
1cm = 236 Pixels or 28.346 Points
So you can work out that say 3.5cm would be 827 Pixels or 99.213 Points

You can use Access to convert your pictures to a bitmap (using the insert
object action)

A common mistake is to placed uncompressed images into your D
Base. This is a common error so don’t worry if you have but the main thing
to remember about pictures (without at all getting technical) is that they
are BIG.

If your images were taken by a standard digital camera or scanner then you
will have a jpeg and if your pictures are at the moment 72dpi and 7.5mb then
each pictures is 73cm X 55cm which is too say the least too big. The same
picture resampled down to 2cm by 3cm “AND†converted to a bmp (bitmap) would
be only 1420kb (a standard 6inch by 4inch would be over 7mb).

So what you need to do is to compress and reduce the image size "to what you
need". The average size of OLE box in the forms I have made in the past is
around 2cm by 3cm. THIS IS ALL YOU NEED and (more importantly) you ONLY need
the images to be saved at 72dpi as you will not see and difference on your
screen at anything higher (unless you want to zoom in to the picture - which
is not to idea with OLE objects)

Hope this helps and points you in the right direction
 
G

Guest

Hi Iram

Sorry about the delay getting back to you. (Been sitting on beach).

No you don't need to instal Microsoft Photo Editor to link photos to your
DB. You would only that if you wanted to edit your pictures and you didn't
have another - better programme (Microsoft Photo Editor is "really" bad -
sorry Mr Gates).

"DON'T" rename you photos. The extension jpeg, tiff,bmg,wmf,etc,etc (there
are loads of em) is not simly a name. It signifies the "type" of picture
that you have and also it lets the programmes on your machine know what type
of programme to use to open the pic. The extention will normally be added by
the programme. If it isn't then right click the pic to see what type of pic
your have (properties) and open the pic with the correct programme.

If you don't have Microsoft Photo Editor then I think I saw it on the main
MS site as a free download but if this isn't poss then the whole world will
tell you that you "must" have" adobe - but if you are not used to running
graphics programmes - I would suggest suggest correl (ensure you do a full
instal from the disk and most of the option are interrelated).
 

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

Similar Threads


Top