Locked lesson.
About this lesson
Add an attachment form control.
Exercise files
Download this lesson’s related exercise files.
12.02 attachment-data-type - Exercise.docx53.7 KB 12.02 attachment-data-type - Exercise solution.docx
69.8 KB TechGurusTicketing29.accdb
1.5 MB TechGurusTicketing29 - Complete.accdb
1.6 MB Invoice.pdf
68.3 KB Trip_Itinerary.pdf
82.5 KB
Quick reference
Data Types: Attachments
Add an attachment form control.
When to use
Add an attachment form control whenever you want to create a link to an external document i.e. a pdf file.
Instructions
In this example, we are going to attach a pdf copy of an invoice to the first ticket.
- Open ‘tblTicket’.
- Add a new field with the following properties:
- Name: Invoice
- Data Type: Attachment
- Description: Invoice attachment showing charges
- Indexed: No
- Switch to Datasheet View.
- Double-click the paperclip icon in the first record.
- Click the Add button.
- Browse to the relevant folder and select ‘Invoice.pdf’.
Add the Attachment Form Control
- Open ‘frmTicketMaintenance’.
- From the Form Design tab, in the Form Controls group, select Attachment.
- Draw a text box on the form.
- Click the label and modify the properties in the Property Sheet:
- Name: InvoiceLabel
- Caption: Invoice
- Click on the attachment form control.
- From the Property Sheet, in the Control Source field, click the drop-down and select ‘Invoice’.
- Switch to Form View and review the changes.
Lesson notes are only available for subscribers.