3 Effective Methods to Handle Images in MS Access Database

This article addresses different ways using which users can insert images in MS Access database.

Like any other document, images can really help in transforming the appearance of a presentation. Visual display also comes in handy in distinguishing different categories of a database. MS Access offers three different techniques to manage images in MS Access.Learn to Handle Images In MS Access

  1. The user can Store their image in the OLE field and later use a bound object type frame to display the image in the document.
  2. The user can Store any path of the image in the document text field, using the image control button to display the image.
  3. The user can also Store the image using BLOB (binary large object bitmap) in the OLE field, and then extract the image whenever required by using the image control button to display the image.

All three of these Techniques come with their own Disadvantages and Advantages.

First Technique

Store The Image In The OLE FieldIt is amongst the most problematic, as it is known for causing multiple server errors on OLE (Object Linking and Embedding). This uses the same application which is used in MS Paint to display an image. This technique can also lead to a number of other images displaying problems.

Another complaint associated with this technique is that it can increase the size of your database to a significant amount. As Access stores and creates bitmap version of its images while operating on this technique.

Second technique

This is the more preferred technique amongst the three options. It is also relatively easier to implement. The user just needs to store the image path in the text field, and the image is automatically displayed through the standard image control. A user is just required to set the property path of image control ‘picture’ so that it can be detected and achieved using VBA.

To make this technique user friendly we would suggest users to use ‘file open’ dialog box, which will allow you to browse through your system and enter the path.

The technique fails to work properly only while working on continuous forms in MS Access. Apparently when the user inserts the same image in continuous forms, he/she is unable to track or distinguish between individual image controls, and eventually, the same image ends up displaying all records.

Third Technique

This technique involves the most complex procedure however, it is the safest and the smoothest way to insert images in MS Access. Users can also add password protection to their images using this method. Plus this also tackles all the bloats which are associated with both the above techniques. For this technique, user can use the ‘file open’ option to browse to any image. Users can either use ADA or DAO for grabbing the image and reading it in OLE field.

In order to display the image using this method, a user will have to extract the database in a separate temporary file, and like the second technique set its ‘picture’ property to the temporary file’s path. Once the user is done with the process, he/she can use VBA Kill, to delete the file. Unfortunately, this technique also struggles while working on continuous forms. So we suggest users to use single form and set their picture property control settings individually.

To keep the data in your Access database accessible even after a database crash, consider investing in a repair utility that can recover data from corrupted mdb or accdb files.

Author Introduction:

Vivian Stevens is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including sql recovery and excel recovery software products. For more information visit www.datanumen.com

One response to “3 Effective Methods to Handle Images in MS Access Database”

Leave a Reply

Your email address will not be published. Required fields are marked *