Learn Microsoft Access Advanced Programming Techniques, Tips and Tricks.

Attachment Field in Access2007

Working with images or animations in Applications like MS-Access was always fun.  I have used Office Assistant for Message Boxes in all my Microsoft Access Applications by creating and installing common VBA library programs on the network.

I don't know how many of you know that you can display your own custom images in the Office Assistant control.  I have used this feature to display custom made greetings to my MS-Access Application Users on special occasions like Christmas, Eid, Onam etc. by simply replacing a company logo image (used for normal display in the message box) on the Server.  I am totally disappointed when Microsoft discarded this feature from Microsoft Office 2007.

Those who are still using Microsoft Access2003 or earlier versions can check the following links for tricks with Office Assistant for MsgBox:

The Attachment Field type in Access2007 gives much needed flexibility in storing several external documents or images in one record without inflating the database size, as it does with Object Linking and Embedding (OLE) method widely used in earlier version of Access for storing/editing/displaying images. Hyperlinks in a data field can be used for linking only one external file or any one internal object like Form or Report.

Attachment Field gives much needed advantage in storing and retrieving important documents like Project site plans, diagrams, Contract Agreements, Engineering Drawings, employees’ family photos or whatever related to a particular record in the database.  The attached document or image can be edited in its own native Application.

A Sample Demo.

  1. Open Microsoft Access2007.
  2. If you have already created the Northwind 2007.accdb sample database then open it; otherwise select Local Templates from the Template Categories.
  3. Click on the Northwind 2007 Template to select it.
  4. Click on the Folder icon at the right side of the File Name control and select the required folder to save the Northwind 2007.accdb database.
  5. Click on the Create Command Button to create the sample database and open it.
  6. Close the Home Form.
  7. Select Object Type from the drop down list in the Navigation Pane and select Tables.
  8. Right-click on the Employees table and select Design View from the Shortcut Menu.
  9. Use the right scroll bar to move the field list up and bring the last field Attachments with field type Attachment into view.
  10. Now that we have seen the Attachment Field in Employees Table (or you can create a new Table with the Attachment Field, if you prefer) close the design view.
  11. Open the Employees Table in Datasheet View.
  12. Move the horizontal scroll bar and bring the attachment field into view, see the sample image shown below:
  13. The second column (highlighted) is the attachment field where a paper clip image and a number in brackets (zero) showing how many attachments are there in each record.
  14. There are no attachments added in any of those record so far, so we will do that; double-click in the attachment field of the first record.
  15. 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.
  16. Repeat this action to attach more files into the same field.
  17. Click OK to close the dialog box.  You will now see a number appearing in brackets indicating how many attachments are there in that field of the record.
  18. Double-click on the attachment field to open and show the attached files.
  19. Click on one of the files to select it.
  20. 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.
  21. If you right-click on 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.
Technorati Tags:

1 comment:

Comments subject to moderation before publishing.


Subscribe in a reader
Your email address:

Delivered by FeedBurner


Popular Posts

Blog Archive

Powered by Blogger.

Follow by Email


Forms Functions How Tos MS-Access Security Reports Class Module msaccess forms Animations msaccess animation Utilities msaccess controls Access and Internet MS-Access Scurity MS-Access and Internet Array External Links Queries msaccess reports Downloads msaccess tips Accesstips Objects Collection Object Property Event Menus and Toolbars Controls MsaccessLinks Process Controls WithEvents Art Work VBA msaccess How Tos Combo Boxes Dictionary Object Graph Charts List Boxes Query msaccessQuery Calculation Command Buttons Form Report Command Button Data Emails and Alerts RaiseEvent Custom Functions Custom Wizards DOS Commands Data Type Object Reference ms-access functions msaccess functions msaccess graphs msaccess reporttricks Item Key msaccessprocess security advanced Access Security Add Auto-Number Field Type Fields Form Instances Macros Menus Recordset SubForm Top Values Variables msaccess email msaccess menus progressmeter Access2007 Copy Excel Expression Join Methods Microsoft Numbering System Records Security Split Table Time Difference Utility Workgroup Wrapper Classes database function ms-access msaccess wizards reference text tutorial vba code Access Emails and Alerts Access Fields Access How Tos Access Mail Merge Access2003 Accounting Year Action Animation Attachment Binary Numbers Bookmarks Budgeting ChDir Color Palette Conditional Formatting Data Filtering Database Records Defining Pages Diagram Disk Dynamic Lookup Error Handler Export External Filter Formatting Groups Hexadecimal Numbers Import Labels List Logo Macro Mail Merge Main Form Memo Monitoring Octal Numbers Operating System Paste Primary-Key Product Rank Reading Remove Rich Text Sequence SetFocus Summary Tab-Page Tables Union Query User Users Water-Mark Word automatically commands hyperlinks iSeries Date iif msaccess msaccess alerts pdf files restore switch toolbar updating upload