Attachment Object (Access)

This object corresponds to an attachment control. Use an attachment control when you want to manipulate the contents fields of the attachment data type.

Version Information

Version Added: Access 2007

Remarks

Note

You can attach files only to databases that you create in Office Access 2007 and that use the new .accdb file format. You cannot share attachments between a Office Access 2007 (.accdb) database and a database in the earlier (.mdb) file format.

You can attach a maximum of two gigabytes of data (the maximum size for an Access database). Individual files cannot exceed 256 megabytes in size.

Supported image file formats

Office Access 2007 supports the following graphic file formats natively, meaning the attachment control renders them without the need for additional software.

  • BMP (Windows Bitmap)

  • RLE (Run Length Encoded Bitmap)

  • DIB (Device Independent Bitmap)

  • GIF (Graphics Interchange Format)

  • JPEG, JPG, JPE (Joint Photographic Experts Group)

  • EXIF (Exchangeable File Format)

  • PNG (Portable Network Graphics)

  • TIFF, TIF (Tagged Image File Format)

  • ICON, ICO (Icon)

  • WMF (Windows Metafile)

  • EMF (Enhanced Metafile)

Supported formats for documents and other files

As a rule, you can attach any file that was created with one of the 2007 Microsoft Office system programs. You can also attach log files (.log), text files (.text, .txt), and compressed .zip files.

File-naming conventions

The names of your attached files can contain any Unicode character supported by the NTFS file system used in Microsoft Windows NT (NTFS). In addition, file names must conform to these guidelines:

  • Names must not exceed 255 characters, including the file name extensions.

  • Names cannot contain the following characters: question marks (?), quotation marks ("), forward or backward slashes (/ \), opening or closing brackets (< >), asterisks (*), vertical bars or pipes (|), colons (:), or paragraph marks (ΒΆ).

Types of files that Access compresses

Access will compress your attached files unless those files are compressed natively. For example, JPEG files are compressed by the graphics program that created them, so Access does not compress them. the following table lists some supported file types and whether or not Access compresses them.

File Extension

Compressed?

Reason

.jpg, .jpeg

No

Already compressed

.gif

No

Already compressed

.png

No

Already compressed

.tif, .tiff

Yes

.exif

Yes

.bmp

Yes

.emf

Yes

.wmf

Yes

.ico

Yes

.zip

No

Already compressed

.cab

No

Already compressed

.docx

No

Already compressed (Metro file)

.xlsx

No

Already compressed (Metro file)

.xlsb

No

Already compressed (Metro file)

.pptx

No

Already compressed (Metro file)

Blocked file formats

Office Access 2007 blocks the following types of attached files. At this time, you cannot unblock any of the file types listed here.

.ade

.ins

.mda

.scr

.adp

.isp

.mdb

.sct

.app

.its

.mde

.shb

.asp

.js

.mdt

.shs

.bas

.jse

.mdw

.tmp

.bat

.ksh

.mdz

.url

.cer

.lnk

.msc

.vb

.chm

.mad

.msi

.vbe

.cmd

.maf

.msp

.vbs

.com

.mag

.mst

.vsmacros

.cpl

.mam

.ops

.vss

.crt

.maq

.pcd

.vst

.csh

.mar

.pif

.vsw

.exe

.mas

.prf

.ws

.fxp

.mat

.prg

.wsc

.hlp

.mau

.pst

.wsf

.hta

.mav

.reg

.wsh

.inf

.maw

.scf

See Also

Concepts

Attachment Object Members

Access Object Model Reference