Professional Documents
Culture Documents
Practical Guide Com221
Practical Guide Com221
NATIONAL DIPLOMA II
PRACTICAL GUIDE/ASSIGNMENT
ON
PROGRAMME: ________________________________________________________
SESSION: ______________________________________________________________
Instructions:
All answers, submission and conclusion should be typed and well numbered. Use the cover page above
for all solutions.
Carryout the following experiments; 1, 2, 3, 4, 6,8 Find below solution sessions, for guide.
Note: Under Field properties of each field, remember to caption your fields appropriately and make sure
all fields are NOT NULL (Required: Yes)
Instruction/Procedures
i. Open a Microsoft Access
vi. To define “cid” as Primary Key and caption it as CUSTOMER ID, Click on the field
name “cid” under the Design Tab ribbons, locate the primary key icon, then click
(Primary key defined). Below field declaration section, is “Field Properties” Locate
Caption and type in CUSTOMER ID.
vii. To appropriately assign datatype to “mnumber” the input mask (Field Properties)
need to defined based on the format required.Click on the field name “mnumber” and
assign short Text as the datatype, Goto the “field properties” section locate input
mask, and click the build button(a three dotted button). Accept to save the table and
name it “CUSTOMERS”
Click OK
Character Explanation
0 User must enter a digit (0 to 9).
9 User can enter a digit (0 to 9).
# User can enter a digit, space, plus or minus sign. If skipped, Access
enters a blank space.
L User must enter a letter.
? User can enter a letter.
A User must enter a letter or a digit.
Task3: The fields (city and state) can be lookup either by typing the values or from another table.
Instructions
Task4: Do it yourself exercise 1: For the state field create a Table (STATE). Then lookup the values from
a column of the table(STATE).
Note: To accomplish the exercise above, you need to close the Design View and create a new table.
Task5: Input mask the “pnumber” field to accept only maximum of three digits. Assign the Currency
datatype to the “ptotal” field and Date/Time to “pldate” field respectively. Note that all fields are NOT
NULL
Instructions: Add a validation text (Please, enter the number of purchases made. Thanks) to guide data
entry.
Task7: Do it yourself exercise 2: Fields in a table can be altered, deleted or added base on need. Delete
the “state” field and insert a new field GENDER (gender) before mnumber.
Instructions: Declare a Validation Rule (Male or Female) and also a Validation Text (Please, enter your
gender. Thanks)
ii. To select the fields to show on the form, click on the fields one after the other and
click single forward arrow (>) or the double forward arrow (>>) to move selected
fields at once and click “Next”.
iii. Select Columnar as the form layout and click “Finish”
iv. To add new records using the form, Click on New Record icon at the buttom of the
form
v. Enter five new records, after each record click on the “New Record” icon or press the
Tab button.
Result:
Task2: On Customers Form, go-to Design view and click on Design Tab to modify the form to
make it more friendly and intuitive applying your desktop publishing skills while exploring the
predefined commands with button tool.
Result
Every table is broken up into smaller entities called fields. A field is a column in a table that is
designed to maintain specific information about every record in the table. A record, also called a row,
is each individual entry that exists in a table. A record is a horizontal entity in a table.
A column is a vertical entity in a table that contains all information associated with a specific field in
a table.
Task3: Create a query that displays only the following fields (Customer id, First name, Mobile
number, Total Amount and City) as arranged.
Procedures/Instructions (Using Query Wizard)
i. Click on the “Create Tab” and click on “Query Wizard” from the ribbons
ii. Select Simple Query Wizard and click Ok
iii. Select the required fields one after the other in the arranged format by clicking the
single arrow “>” to move the fields to Selected fields from Available fields.
iv. Click Next twice, Rename the title of the query to Customers Summary and Click
Finish
Task4: Create a query that displays record of Ilorin customers sorted by last name in ascending
order.
Procedures/Instructions (Using Query Design)
i. Click on the “Create Tab” and click on “Query Design” from the ribbon
ii. Select the CUSTOMERS table and click Add to query the said table then close the
Show Table dialogue
iii. From the table below,
On the “field”row in first column select ‘CUSTOMERS.*’ (‘*’ simply means
display all fields that met the condition)
On the “field” row in second column select ‘city’ and on the Criteria row on
same column type ‘ ”Ilorin” ’ (simply means display customers only whose
city is ’Ilorin’) Note: uncheck the checked box on show row
On the “field” row in third column select ‘lname’ and on the “Sort” row on
same column select Ascending (simply means ‘arrange last name in
ascending order’) Note: uncheck the checked box on show row
iv. On Design Tab, click on Run (!) on the ribbons
Task 5: Create a query that displays first name, city and total price of items purchased of
customers whose total purchase is less $100 or less
Procedures/Instructions (Using SQL)
i. Click on the “Create Tab” and click on “Query Design” from the ribbon
ii. Close the Show Table dialogue and click on SQL view under the Design Tab.
iii. In SQL view, type “SELECT fname, city, ptotal FROM customers WHERE ptotal <=
100;” and click Run (!) on the Design Tab ribbons
- To save, press Ctrl + S, and name as “100 and below total purchase”
USING WILDCARDS IN QUERY
WILDCARDS
Wildcards are special characters that can stand in for unknown characters in a text value and are
handy for locating multiple items with similar, but not identical data. Wildcards can also help
with getting databased on a specified pattern match.
ANSI-89 Wildcard Characters
The following table lists out characters supported by ANSI-89 −
Matches any number of characters. You can use the wh* finds what, white, and
*
asterisk (*) anywhere in a character string. why, but not awhile or watch.
? Matches any single alphabetic character. B?ll finds ball, bell, and bill.
Matches any number of characters. It can be used as wh% finds what, white, and
%
the first or last character in the character string. why, but not awhile or watch.
_ Matches any single alphabetic character. B_ll finds ball, bell, and bill.
Task 1: Using SQL, Query the customers table to display the names and city of customers whose
city ends with “a”
Procedure
i. In SQL view, type ” SELECT fname, lname, city FROM customers WHERE city
LIKE '*a';” and Run.
REPORTS
Design a report for the “customers summary” query.
Procedures
i. On the Create Tab, click on “Report Wizard”
ii. On the report wizard dialogue box, Select “Query: CUSTOMERS SUMMARY” and
move the fields from available fields to selected fields with “>>” as applicable to
form wizard and click Next.
iv. Select the field to sort with in ascending or descending order if need be, then click
Next and select the your preferred Layout (Tabular preferably) and Finish
Note: Just as form, report design can be modify in Design View
Task3: Modified the report as shown below .
RELATIONSHIP
Relationship is the association between two more tables. Relationship allow you access data
Task1: Establish the relationship between the customers and state table.
Procedures
i. On the “Database Tool Tab” Click Relationship.
ii. On State table, city is the primary key and a foreign key on the customers table (that is a cross
reference). Pick the city on state table and drop on the city on customers table.
iii. Click Create if no need to check the Enforce Referential Integrity (It ensures that user don’t
accidentally change or delete related data, i.e keeps record fields valid and accurate)
The relationship type is one to many i.e there are many customers in one city.
Final Instruction: Print all tables, forms, reports, queries and relationships as your result.