Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Images on form (2007 and 2003)

    I fully understand that it's unwise to store images in an Access database. (Bloat and all that.) Well, along comes Office 2007, and it appears that this latest version of Access has at last solved the problem. But has it...really? Is it still a better practice to store the path to the JPG file as text in the table and link to it?

    One more thing: I've tried several times to place an image control on an Access form. Every time, once I've drawn the image control on the form, Access opens a file dialog box and insists that I tell it where to find the image that will display in the control. I've un-ticked the control wizard, but this behavior persists. How do I insert an unbound image control?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Images on form (2007 and 2003)

    The only image type that Access 2003 and before can handle is .BMP (uncompressed bitmap), so if you store a highly compressed image such as a .JPG or .PNG image in the database, Access will store an uncompressed .BMP alongside the original version. This causes the tremendous file size bloat.

    For example, an 800x600 pixel full color photograph could be around 80 KB as a .JPG file. The corresponding uncompressed .BMP is 1406 KB. Since Access 2003 (and earlier) stores both, the picture takes up a whopping 1486 KB. If you store 100 such pictures in a database, the total size of the JPGs is just 8000 KB, or less than 8 MB, but they would take up over 145 MB in the database!

    Access 2007 finally adds native support for other file types than .BMP, so it doesn't need to store a .BMP for each image any more - the above 100 .JPG pictures would only take up 8 MB in the database. For compatibility reasons, this feature is not turned on by default; you can activate it as follows:
    - Click the Microsoft Office Button.
    - Select Access Options.
    - Select Current Database.
    - Select "Preserve source image format (smaller file size)".

    I don't have Access 2007, but in earlier versions, Access will always prompt you to select a picture when you insert an Image control. Don't cancel, for that would cancel inserting the control, just select any old picture and click OK.
    Then, with the Image control still selected, activate the Format tab of the Properties window and clear the Picture property. Access will ask for confirmation, click Yes. You now have a blank Image control that can be filled manually or using code.

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Images on form (2007 and 2003)

    Wow! What a great explanation! Now I finally understand how to add the image control. I've tried exactly what you said not to do: I've hit "cancel" when prompted for the picture. I couldn't see what else to do. Many thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •