MS Access How To: Basic forms incl....
Transcript of MS Access How To: Basic forms incl....
![Page 1: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/1.jpg)
MS Access How To:
Basic forms incl. searchUNIT 18 DATABASE DESIGN
EXTENDED DIPLOMA IN ICT
![Page 2: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/2.jpg)
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
![Page 3: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/3.jpg)
The example database
A costume hire database
4 tables
![Page 4: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/4.jpg)
The example database
A costume hire database
4 tables
Create tblCustomer by importing data
![Page 5: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/5.jpg)
The data
![Page 6: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/6.jpg)
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
![Page 7: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/7.jpg)
Forms - purpose
Enable user
Data entry
Data retrieval
Protect database
![Page 8: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/8.jpg)
Customer form: 1
On the Create tab choose Form Design to open a new form
design object
![Page 9: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/9.jpg)
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
![Page 10: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/10.jpg)
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
![Page 11: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/11.jpg)
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
![Page 12: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/12.jpg)
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
![Page 13: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/13.jpg)
Customer form: 5
Select the label and then change the caption in the property
sheet
LabelCaption
New caption
![Page 14: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/14.jpg)
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
![Page 15: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/15.jpg)
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)
![Page 16: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/16.jpg)
Search
Form shows all the details for one customer.
Need facility to search
Use combo-box
![Page 17: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/17.jpg)
Customer form: 8
Drag a combo box onto the form next to the customer last
name. The Combo Box Wizard starts
Combo
Box
![Page 18: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/18.jpg)
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
![Page 19: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/19.jpg)
Customer form: 9
Select the LastName and then FirstName fields for the Combo
Box. The wizard shows how the box will look.
![Page 20: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/20.jpg)
Customer form: 10
Choose a suitable label for this box e.g. ‘Search’ or ‘Find’
Provide a
suitable label
![Page 21: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/21.jpg)
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
![Page 22: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/22.jpg)
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
![Page 23: MS Access How To: Basic forms incl. searchwiki.hct.ac.uk/_media/computing/btec/level3/l6baccesshowtobasicforms.pdf · UNIT 18 DATABASE DESIGN EXTENDED DIPLOMA IN ICT. Last week Complete](https://reader033.fdocuments.in/reader033/viewer/2022041416/5e1b7383b9e96c65bc59e4f7/html5/thumbnails/23.jpg)
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