How can I attach a file to each record

HappyBunny

Registered User.
Local time
Today, 07:14
Joined
Jun 6, 2008
Messages
22
I've seen Access 2007 explanations, but Access 2003 doesn't seem to have an Attachment option under Data Type.

How do I go about it. :D
Please help.
Thanks
 
You can use the File System Object to transfer files into a specified location (attachments subfolder), and use a table to store the record ID and attachment name. This requires a good amount of familiarity with VBA to accomplish, but it's the only way I know of.
 
On the say 'Attachments' table you'll need a reference to the other table and then an OLE field, in the case below called 'Attachment'. This will store the attachment. The follwoing code can then be added to a button on your form.

Code:
[Forms]![Form_Name]![Attachment].SetFocus
    DoCmd.RunCommand acCmdInsertObject
    [Attach] = True ' this just ticks a little box on my form to show there's an attachment
    Me.Refresh

Simple, but hope that helps.
 

Users who are viewing this thread

Back
Top Bottom