Keyfield

Access attachment fields: how to get the files out

Some Access databases keep files inside records: a scanned invoice with each order, a photo with each product, a signed form with each member. Those live in an attachment field, and they don’t show up anywhere in a spreadsheet export.

Short answer

An Access attachment field stores whole files inside the database, one or several per record. In Access on a PC, double-click the field to open the Attachments dialog and save the files. On a phone, Keyfield’s row form lists each file in the field with its name and size, and Keyfield Pro saves that row’s files to a folder you choose.

Get Keyfield Opens .accdb and .mdb files. Viewing is free, with no account.

What an attachment field is

The attachment data type arrived with the .accdb format in Access 2007. Unlike a field that holds a file path, it stores the file itself, so the database carries its documents with it. One field can hold several files for the same record. Older .mdb databases don’t have the type; they sometimes used OLE Object fields for a similar job.

Because the files are inside the database, they count against its 2 GB limit, and a database full of photos is often bigger than you’d expect from its row counts.

In Access on a PC

Open the table, find the record, and double-click the attachment cell (it shows a paperclip and a count). The Attachments dialog lists the files; select one and choose Save As, or Save All for every file in that record. There is no built-in button that saves every attachment in the table at once; that takes a little VBA.

On your phone

  1. Open the database in Keyfield (how) and the table with the files.
  2. Tap a row to read it as a form. Each attachment field lists its files, each name with its size underneath, for example invoice-0412.pdf and Attachment · 212 KB.
  3. With Keyfield Pro, tap Save on the field and pick a folder: that row’s files are written there, ready to open or send.

Seeing which files a record has is free. Saving them is part of Keyfield Pro, a one-time purchase that also covers exporting tables and opening Access 2007 password files.

Other fields that look odd outside Access

When you export the table to a spreadsheet, the attachment files themselves stay behind; save them separately as above (exporting a table to Excel).

See the files inside each record

Keyfield lists every attachment with its name and size, free. Keyfield Pro saves a row’s files to a folder on your phone, paid once.

Get it on Google Play