End IfNextDoc:
Next filOpen the Contacts form to see the attachments that have been loaded.DoCmd.OpenForm FormName:=”frmContacts”ErrorHandlerExit:
Exit FunctionErrorHandler:
MsgBox “Error No: “ & Err.Number _
& “; Description: “ & Err.DescriptionEnd FunctionFigure 9.20 shows the main menu of the sample database, Files and Folders.accdb, with the Load
Attachments option selected; this selection calls the LoadAttachmentsfunction.FIGURE 9.20
The main menu, with an Attachments button with two options, for loading or saving attachments.Saving Attachments to Files ....................................................................................
The SaveAttachmentsprocedure performs the opposite function: working with a recordset
based on tblContacts, it uses a Recordset2type recordset to iterate through the attachmentsPart II Writing VBA Code to Exchange Data between Office Components