MS Access How To Look Up and Select Values in Link Tables
1. MS Access How To:
Look up and select
values
Unit 18 Database Design
Extended Diploma in ICT
2. Link tables
• A link table will have foreign keys
• To create a record you want to select a value
from another table and put the key value in
the link table
• You do this using list boxes
3. Example
• You want to select a customer, then a
costume and put the key values for those
selections into the rental table
4. Create a form
• Make a form for the link table
• Add the foreign key IDs
5. Add a list box
• Click on the List Box control and drag out a
list box
• The List Box Wizard starts
List box
control
6. List box wizard
• Choose the list box to look up the values in a
table or query
13. List box wizard
• The wizard closes and the list box allows you
to select a customer and put the ID in the
correct field
14. Adding a subform to show
more detail
• There are more customer details you may
want to show, such as the address.
• You can use a subform for this
• Click on the subform control and draw out a
subform
Subform
control
21. Subform property sheet
• Set
• Default view to Single Form
• Record selectors to No
• Navigation buttons to No
• Scroll bars to Neither
• Delete the label
23. Subform update
• The subform updates when you use the
record selectors, but not when you use the
list box
• Fix this using some VBA (Visual Basic for
Applications)
24. Subform update
• Select the list box
• Then click on the three dots in the After
Update property
List box
selected
Three dots