Locked lesson.
About this lesson
Add a Yes/No checkbox control to a form.
Exercise files
Download this lesson’s related exercise files.
12.01 yes-no-date-type - Exercise.docx43.5 KB 12.01 yes-no-data-type - Exercise solution.docx
74.8 KB TechGurusTicketing28.accdb
1.5 MB TechGurusTicketing28 - Complete.accdb
1.5 MB
Quick reference
Data Types: Yes/No Checkbox
Add a Yes/No Checkbox to the form.
When to use
We add a Yes/No Checkbox to a form whenever we want to collect data that only has a Yes or No answer.
Instructions
Add the Yes/No Field to the table
Before we add a Yes/No checkbox to the form, we need to add it to the relevant table. In this example, we are going to use a Yes/No checkbox to establish if a customer is a VIP.
- Open ‘tblTicket’.
- Add a new field with the following properties:
- Name: VIP
- Data Type: Yes/No
- Description: Is this customer a VIP?
- Indexed: Yes (Duplicates OK)
- Switch to Datasheet View.
- Select three customers as VIPs.
Add the Yes/No Form Control
Now, we can add the Yes/No control to the form.
- Open ‘frmTicketMaintenance’.
- Switch to Design View.
- From the Form Design tab, in the Form Controls group, select Checkbox.
- Draw a text box on the form.
- Click the label and modify the properties in the Property Sheet:
- Name: VIPLabel
- Caption: VIP
- Click on the checkbox form control.
- From the Property Sheet, in the Control Source field, click the drop-down and select ‘VIP’.
- Switch to Form View and review the changes.
Hints & tips
- Find out more about data types in Help (F1).
Lesson notes are only available for subscribers.