Docsity

Database Activity: User Interface Design for Castles Live and Loud, Cheat Sheet of Computer science

Toggle sidebar
bg1
Activity 5
User Interface (Forms) for the Castles Live and Loud
Database
Add a New Customer and Main Menu
Create a Form to Add a New Customer
Make the form look like the one below. To do this click ‘Create’ and ‘Form Wizard’.
Choose tblCustomer to base it on.
You will pick up marks for:
Suitable labels
Suitable title (Add Customer)
Suitable instructions (e.g. ‘use this form to add a new customer ....)
Sensible field widths (to show all data)
Asterisks for compulsory fields (you should have a presence check in
tblCustomer too)
Combo boxes (e.g. on gender)
pf3

Partial preview of the text

Download Database Activity: User Interface Design for Castles Live and Loud and more Cheat Sheet Computer science in PDF only on Docsity!

Activity 5

User Interface (Forms) for the Castles Live and Loud

Database

Add a New Customer and Main Menu

Create a Form to Add a New Customer Make the form look like the one below. To do this click ‘Create’ and ‘Form Wizard’. Choose tblCustomer to base it on. You will pick up marks for:  Suitable labels  Suitable title (Add Customer)  Suitable instructions (e.g. ‘use this form to add a new customer ....)  Sensible field widths (to show all data)  Asterisks for compulsory fields (you should have a presence check in tblCustomer too)  Combo boxes (e.g. on gender)

Extension: Note that there are extra marks available if you are able to create a

query that will generate the primary key automatically. This will require you to build the form again – with ‘unbound’ fields (text boxes that are not bound to fields in the database). The best way to do this is to make a second copy of the Customer form and work on this. Step 1: Copy your customer form Step 2: Disassociate all of the fields from the underlying customer table (in the ‘Control Source’ property – delete the field name. Also disassociate the whole form from the table – select the form (click the small button on the top left of the form) and delete the table in the Record Source property. Step 3: Create an additional text box to generate the ID (name it GenerateID) – use the ‘build’ function in the Control Source property (shown in the footer of the form above – and shown below). Note that the ID will only be generated when you have typed in the first name and last name on the form – look at the code below and work out what it is doing. When you have fully tested disable this text box (Visible = No). =Left([Forms]![frmCustomer]![Customer Last Name],3) & Left([Forms]! [frmCustomer]![Customer First Name],2) Step 4: Type =GenerateID in the Control Source of the Customer ID text box. Note that you must name all of your text boxes sensibly – you will need this for step

Step 5: Create a query that will append the data from the completed form to the table. Note that this is an append query and you will use the build function to pick up data on an open and filled in form. No table is required here.