Prelims Lab Exercise #10 - M2U4
Prelims Lab Exercise #10 - M2U4
Reyes
BSIT 101
4. In the prompt at the bottom of the window, click Save. When download is complete, in the
6. If necessary, on the taskbar, click the Java icon. In the Java Setup wizard, click Install. At
the license terms warning prompt, click OK.
7. When prompted, click Close.
8. In the browser, navigate to openoffice.org/download
9. Under the Download Apache OpenOffice heading, select Windows (EXE) and English (US).
10. If necessary, accept the use of cookies by the SourceForge site. In the prompt at the bottom
of the window, click Save.
11. When download is complete, in the prompt, click Run.
12. In the User Account Control window, read the warning but click Yes.
13. In
15.
On the Welcome to the Install Wizard for OpenOffice page, click Next.
16. On the Customer Information page, click Next.
17.
O
the Setup Type page, click Custom and then click Next.
20.
22.
C
23.
O
26. From the Tools menu, select Options. In the Options dialog, select Java.
27.
Click OK.
3. In
the Database Wizard, on the Select database tab, click Create a new database and then
click Next.
6. In the File name box, type CompTIA and then click Save.
7. In the open database window, click Tables and then click Create Table in Design View.
8. In the new table window, in the Field Name column, type CustomerID
9. In the Field Type column, select Integer [INTEGER], and in the Description column, type
Primary key for the Customer table
10. In
12.
N
ot in the PDF
15. Add an address field to the table with the following properties:
Field Name: Address
Field Type: Text [VARCHAR]
Description: Enter the address
Required: No
Length: 50
16. Add a telephone field to the table with the following properties:
Field Name: Telephone
Field Type: Number [NUMERIC]
Description: Enter the phone number with no spaces
Required: No
Length: 10
17.
18. In the Save As box, type the name Customer and click OK.
19. Close the Customer table. In the database window, click Create Table in Design View.
20. In the new table window, in the Field Name column, type ContactID.
21. In the Field Type column, select Integer [INTEGER], and in the Description column, type
Primary key for the Contact table
22. In the lower panel, from the AutoValue box, select Yes.
23. Click back in the field name area. The field is set as a primary key automatically.
25. In the Field Type column, select Integer [INTEGER], and in the Description column, type
Select a customer record
26. In the lower panel, from the Entry required box, select Yes.
27. Add a first name field to the table with the following properties:
Field name: FirstName
Field type: Text [VARCHAR]
Required: Yes
Length: 25
28. Add a surname field to the table with the following properties:
Field name: Surname
Field type: Text [VARCHAR]
Required: Yes
Length: 25
33. In the Add Tables dialog, with Customer selected, click Add then select Contact and click
Add.Click Close.
34. Drag the CustomerID field from the Customer table over the Customer field in the Contact
table.
35. Close the Table Relationships window. Click Yes to save when prompted.
36. On the menu bar, click Save to save the database tables.
Exercise 3 / Creating a Form and Entering Data
3. In the Form Wizard, in the Tables or queries list, select Table: Customer.
4. In the Available fields list, select Name, Address, and Telephone then click >.
5. Click Next.
6. Check the Add Subform box and the Subform based on existing relation option button.
Select Contact.
7. Click Next.
8. Add the FirstName and Surname fields then click Next.
9. On the Arrange controls lab, under Arrangement of the main form, click Columnar – Labels
left icon. Under Arrangement of the subform, click As Data Sheet.
15. Click in the subform data sheet and enter the following information:
FirstName: Dave
Surname: Martin
16. Type the following data in the next row:
FirstName: Sue
Surname: Smith
17.
Click back in the main form (in the Name field for instance) then click the New Record button
18. In the open form, type the following data in the appropriate fields:
Name: Grommet
Address: 321 Main Road
Telephone: 8880002222
19. Click in the subform data sheet and enter one or two contacts.
23.
Open the Contact table and check the Customer field—you should see the values you recorded
above entered in the foreign key.
3. In the Query Wizard window, from the Tables list, select Table:Customer.
7. Click Next.
8. On the Sorting order tab, in the Sort by list, select Customer.Name and in the Then by list,
select Contact.Surname
9. Click Next.
10. With
Match all of the following selected, from the Fields list box, select Contact.FirstName. From
the Condition box, select is not equal to, and in the Value box, type Dave
11. Click Finish. What is wrong with the query results?
I think the output.
12.
Close the query window. In the database window, right-click Query_Customer and select Edit.
13.
Drag the CustomerID field from the Customer table over the Customer field in the Contact table.
14. Click the Save button then press F5
15.
Close the query window. In the database window, right-click Query_Customer and select Edit in
SQL View.
The SELECT statement chooses records for viewing (data manipulation). It is followed
by a list of columns (field) names to use in the output. The AS keyword specifies an alias
for each field.
The FROM keyword lists the data sources (Customer and Contacts).
The WHERE keyword states the join and the criteria excluding “Dave”.