Working with images or animations in applications like Microsoft Access has always been enjoyable. I have used the Office Assistant for message boxes in all my Access applications, particularly when creating and deploying common VBA library programs across the network.
Not everyone may know that it is possible to display custom images in the Office Assistant control. I have leveraged this feature to display custom greetings to Access users on special occasions such as Christmas, Eid, and Onam simply by replacing the standard company logo image on the server. I was extremely disappointed when Microsoft removed this feature in Office 2007.
For those still using Microsoft Access 2003 or earlier, the following links provide tips and tricks for using the Office Assistant with MsgBox:
- MsgBox with Office Assistant
- MsgBox with Options Menu
- Office Assistant with Check-Box Menu
- Selection of Office Assistant
- Color and Picture in MsgBox
- Office Assistant and MsgBox Menus
- Office Assistant and MsgBox Menus-2
- Office Assistant and MsgBox Menus-3
The Attachment field type in Access 2007 has significant flexibility, allowing multiple external documents or images to be stored in a single record without inflating the database size. This overcomes the limitations of the older Object Linking and Embedding (OLE) method, which was commonly used in the earlier Access versions for storing, editing, or displaying images. While a Hyperlink field can link to only one external file or a single internal object (such as a form or report), the Attachment field supports multiple items per record.
This feature is useful for storing and retrieving essential documents related to a record, such as project site plans, diagrams, contract agreements, engineering drawings, or employees’ family photos. Each attached document or image can be edited in its native application, preserving full functionality.
A Sample Demo.
Open Microsoft Access 2007.
If you have already created the Northwind 2007 sample database, open it; otherwise, select Local Templates from the Template Categories.
Click on the Northwind 2007 Template to select it.
Click on the Folder icon on the right side of the File Name control and select the required folder to save the Northwind 2007.accdb database.
Click on the Create Command Button to create the sample database and open it.
Close the Home Form.
Select Object Type from the drop-down list in the Navigation Pane and select Tables.
Right-click on the Employees table and select Design View from the Shortcut Menu.
Use the right scroll bar to move the field list up and bring the last field, Attachments, with field type Attachment, into view.
Now that we have seen the Attachment Field in the Employees Table (or you can create a new Table with the Attachment Field if you prefer), close the design view.
Open the Employees Table in Datasheet View.
Move the horizontal scroll bar and bring the attachment field into view. See the sample image shown below:
The second column (highlighted) is the attachment field where a paper clip image and a number in brackets (zero) displays how many attachments are in each record.
There are no attachments added in any of those records so far, so we will do that; double-click in the attachment field of the first record.
The Attachment control opens up. Click on the Add… Command Button to browse for files on the hard disk. You may select a Word Document, Excel File, PDF file, or Image.
Repeat this action to attach more files to the same field.
Click OK to close the dialog box. You will now see a number appearing in brackets, indicating how many attachments are in that field of the record.
Double-click on the attachment field to open and show the attached files.
Click on one of the files to select it.
If you click on the Remove Command Button, you can remove the selected attachment or click Open to open the document in its parent/preview Application.
If you right-click the attachment field, the Manage Attachment shortcut menu is displayed. Selecting this option will open up the earlier dialog box we have seen for attaching /removing/opening external files.