Paste photo onto the control

A

Anand Vaidya

I have a Photograph (oledb data type) field in the table tblConsultants(for
inserting the photographs of the consultants).

I dragged the Photograph field from the "Field List" window onto the form in
design view.In Form-View,I right clicked onto the Photograph control and
selected Insert Object... Create From File option and selected the photograph
of a consultant ( as a link).It is displaying only the name of the
consultant(edward.jpg) and not the photograph itself and on double clicking
onto the control,the photo is opening in Ms Office Picture Manager.But I want
the photograph itself to be displayed in this control on the form for every
consultant record.

How do I do this?
 
W

Wayne-I-M

Looking your questions it appears that you may have placed an unbound OLE
object. You need a bound OLE based on the record

You can check out this link which on the main MS site
http://support.microsoft.com/kb/285820/en-us

Or as this question is asked many time I have given a “step by step†here.
As it's a cut and paste you may not need it all but I hope it helps you along
in the right direction.

. . . . . . . . . . . . . .
You need to save the original picture on your hard drive and simply show a
“thumbnail†Bitmap copy of this on you form that could be used “as-is†or
maybe as a hyperlink to open the main picture (using OnClick)

BMP = Windows Bitmap this is best option
GIFF CompuServe Bitmap is also OK
JPEG’s “will†work but they are not really meant for this type of application


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)

BMP Windows Bitmap this is best option
GIFF CompuServe Bitmap is also OK
JPEG’s “will†work but they are not really meant for this type of
application REMEMBER that JPEG’s are reducing formats – so each time you
change and save you will lose some resolution.

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 there is no way of converting pixels to cm’s – which 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


Hope this helps and points you in the right direction
 

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