Post on 28-Oct-2019
MS Access How To:
Basic forms incl. searchUNIT 18 DATABASE DESIGN
EXTENDED DIPLOMA IN ICT
Last week
Complete design work
ERD
Normalisation
Decision explanation
Data dictionaries
calculations
Set –up tables that match data
dictionaries
Add example data
Import data for customers/owners
The example database
A costume hire database
4 tables
The example database
A costume hire database
4 tables
Create tblCustomer by importing data
The data
Referential integrity
Set in the Relationships tab in database tools
1: Create the relationship
by dragging the key in one
table onto the key in the
other table
2: This dialogue box opens
and you click on Enforce
Referential Integrity
Forms - purpose
Enable user
Data entry
Data retrieval
Protect database
Customer form: 1
On the Create tab choose Form Design to open a new form
design object
Customer form: 2
In the Property Sheet make sure Form is selected, then choose
the Customer table as the Record Source
Select Form
Select the Customer Table
from this drop down as the
Record Source
Customer form: 3
In the Property Sheet make sure Form is selected, then choose
the Customer table as the Record Source
Select Form
Select the Customer Table
from this drop down as the
Record Source
Customer form: 4
Click on Text Box in the Controls ribbon and drag out a text
box on the form
The Property Sheet changes to Text0
In the Control Source select a field
Select a field
Text Box
(selected)Label
Customer form: 4 notes
The text box was initially ‘unbound’ – not a associated with a
database field
After selecting the field it now uses data from and can pass
data to the selected field
Select a field
Text Box
(selected)Label
Customer form: 5
Select the label and then change the caption in the property
sheet
LabelCaption
New caption
Customer form: 6
Switch to Form View and save the form - frmCustomer
Click
hereOr right click
here
Use the record selectors to scroll
through the records
Customer form: 7
Add the other text boxes and adjust the sizes
Use multiple select to position them and make the sizes equal
(right click when selected)
Search
Form shows all the details for one customer.
Need facility to search
Use combo-box
Customer form: 8
Drag a combo box onto the form next to the customer last
name. The Combo Box Wizard starts
Combo
Box
Customer form: 8
The Combo Box will
show the list of last names and
when one is selected, switch to the record that has that last
name
Choose this
option
Customer form: 9
Select the LastName and then FirstName fields for the Combo
Box. The wizard shows how the box will look.
Customer form: 10
Choose a suitable label for this box e.g. ‘Search’ or ‘Find’
Provide a
suitable label
Customer form: 11
You can now search for names
Choose a name from the drop
down, or key in the first letters
But, drop-down list is not easy to search by scrolling through – it is not
alphabetical
Customer form: 12
To display the names alphabetically, click on the ... in the row source of the Property Sheet. This will open the Query.
Click here
Customer form: 13
Click in the Sort row for LastName and FirstName to sort Ascending. Then save and close the Query.
Click into here then use
the drop down