Table of contents
TOC
Collapse the table of content
Expand the table of content

Attachment Object (Access)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

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

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 ExtensionCompressed?Reason
.jpg, .jpegNoAlready compressed
.gifNoAlready compressed
.pngNoAlready compressed
.tif, .tiffYes
.exifYes
.bmpYes
.emfYes
.wmfYes
.icoYes
.zipNoAlready compressed
.cabNoAlready compressed
.docxNoAlready compressed
.xlsxNoAlready compressed
.xlsbNoAlready compressed
.pptxNoAlready compressed

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

Events

Name
AfterUpdate
AttachmentCurrent
BeforeUpdate
Change
Click
DblClick
Dirty
Enter
Exit
GotFocus
KeyDown
KeyPress
KeyUp
LostFocus
MouseDown
MouseMove
MouseUp

Methods

Name
Back
Forward
Move
Requery
SetFocus
SizeToFit

Properties

Name
AddColon
AfterUpdate
Application
AttachmentCount
AutoLabel
BackColor
BackShade
BackStyle
BackThemeColorIndex
BackTint
BeforeUpdate
BorderColor
BorderShade
BorderStyle
BorderThemeColorIndex
BorderTint
BorderWidth
BottomPadding
ColumnHidden
ColumnOrder
ColumnWidth
Controls
ControlSource
ControlTipText
ControlType
CurrentAttachment
DefaultPicture
DefaultPictureType
DisplayAs
DisplayWhen
Enabled
EventProcPrefix
FileName
FileType
FileURL
GridlineColor
GridlineShade
GridlineStyleBottom
GridlineStyleLeft
GridlineStyleRight
GridlineStyleTop
GridlineThemeColorIndex
GridlineTint
GridlineWidthBottom
GridlineWidthLeft
GridlineWidthRight
GridlineWidthTop
Height
HelpContextId
HorizontalAnchor
InSelection
IsVisible
LabelAlign
LabelX
LabelY
Layout
LayoutID
Left
LeftPadding
Locked
Name
OldBorderStyle
OldValue
OnAttachmentCurrent
OnChange
OnClick
OnDblClick
OnDirty
OnEnter
OnExit
OnGotFocus
OnKeyDown
OnKeyPress
OnKeyUp
OnLostFocus
OnMouseDown
OnMouseMove
OnMouseUp
Parent
PictureAlignment
PictureSizeMode
PictureTiling
Properties
RightPadding
Section
ShortcutMenuBar
SpecialEffect
StatusBarText
TabIndex
TabStop
Tag
Top
TopPadding
VerticalAnchor
Visible
Width

See also

Other resources

Attachment Object MembersAccess Object Model Reference

© 2017 Microsoft