Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Insert photos into Access Forms

Discussion in 'Information Technology' started by Ribcage, Jul 28, 2006.

  1. Ribcage

    Ribcage
    Expand Collapse
    Guest

    Can someone please give me a step by step? sizing them (shrinking) and
    everything?
    I'm struggling, I have photos in *.jpg
    In the Northwinds sample database "employees field" they have them stored as
    text!?
    HELP!
     
  2. Loading...


  3. Ofer

    Ofer
    Expand Collapse
    Guest

    Check this link on "How to include a bound picture on form", it's a good
    start

    http://www.databasedev.co.uk/bound_image_form.html

    "Ribcage" <Ribcage@discussions.microsoft.com> wrote in message
    news:E2CD0E7A-809D-4F0D-8167-126E26B0704B@microsoft.com...
    > Can someone please give me a step by step? sizing them (shrinking) and
    > everything?
    > I'm struggling, I have photos in *.jpg
    > In the Northwinds sample database "employees field" they have them stored

    as
    > text!?
    > HELP!
     
  4. Wayne-I-M

    Wayne-I-M
    Expand Collapse
    Guest

    Hi Ribcage

    Are you sure you want to "insert" (embedd) insead of "linking" - see Offer's
    answer.

    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 - (either use Offer's answer or use the
    link file on the properties box on form design

    The method shown on the MS website (see Offer's answer) 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

    --
    Wayne
    Manchester, England.



    "Ribcage" wrote:

    > Can someone please give me a step by step? sizing them (shrinking) and
    > everything?
    > I'm struggling, I have photos in *.jpg
    > In the Northwinds sample database "employees field" they have them stored as
    > text!?
    > HELP!
     
  5. Bob Barnes

    Bob Barnes
    Expand Collapse
    Guest

    I have an App w/ Unbound Controls.

    As I populate each record, I have a textbox called ABCD & an Image Control.

    The code snippet...From opening a Recordset for the PK for the Record..
    ...
    ABCD = !APic ----> "APic" just stores th Path - IE...C:\BobDev\Bob5.jpg
    Me!Image123.Picture = Me!ABCD

    "Image123" is an Embedded Picture Type, Size Mode = Clip, Picture Alignment
    = Center, Picture Tiling = No.

    HTH - Bob

    "Ribcage" wrote:

    > Can someone please give me a step by step? sizing them (shrinking) and
    > everything?
    > I'm struggling, I have photos in *.jpg
    > In the Northwinds sample database "employees field" they have them stored as
    > text!?
    > HELP!
     
  6. Larry Linson

    Larry Linson
    Expand Collapse
    Guest

    "Ribcage" wrote

    > Can someone please give me a step by
    > step? sizing them (shrinking) and
    > everything? I'm struggling, I have
    > photos in *.jpg In the Northwinds sample
    > database "employees field" they have
    > them stored as text!?


    The sample imaging databases at http://accdevel.tripod.com illustrate three
    approaches to handling images in Access, and the download includes an
    article discussing considerations in choosing an approach. Two of the
    approaches do not use OLE Objects and, thus, avoid the database bloat, and
    some other problems, associated with images in OLE Objects.

    If you are printing the images in reports, to avoid memory leakage, you
    should also see MVP Stephen Lebans' http://www.lebans.com/printfailures.htm.
    PrintFailure.zip is an Access97 MDB containing a report that fails during
    the Access formatting process prior to being spooled to the Printer Driver.
    This MDB also contains code showing how to convert the contents of the Image
    control to a Bitmap file prior to printing. This helps alleviate the "Out of
    Memory" error that can popup when printing image intensive reports.

    Larry Linson
    Microsoft Access MVP
     

Share This Page