Access XP Beginners Exercises
Access XP Beginners Exercises
Access XP Beginners Exercises
Lessons 1 8 will be used while designing a database on paper Exercise 9. Creating a new database
8) Set Supplier_ID as the Primary key 9) Close and save the table as Supplier 10) Create a table in design view with the following fields
11) Set Supplier_ID and Product_ID as the Primary Key 12) Close and save the table as Product_Supplier 13) Create a table in design view with the following fields
14) Set Maker_ID as the Primary Key 15) Set the field size of Maker Name as 40 16) Close and save the table as Maker
1. Change the order of the fields in the Supplier table to that shown below:
Page 2 of 13
2. Delete the Web_site field. 3. Close the table and save the design changes 4. Open the Maker table in design view 5. Add the following fields
6. Change the field size of Contact name to 25 7. Change the order of the fields to:
Page 3 of 13
Page 4 of 13
Page 5 of 13
Microsoft Access XP Beginners- Exercises Exercise 25. Controlling Input to a table using Validation
1. Using the database Lesson 21 database: 2. Open the Order table in design view 3. Set validation so that the Order_date must be between 1/1/2003 and todays date (inclusive) 4. Change to the datasheet view and try to enter tomorrows date 5. Try to enter 31/12/02 note the error message 6. Change back to the design view and add validation text explaining what dates may be added. 7. Change back to the datasheet view and enter tomorrows date note the error message! 8. Enter todays date 9. Add another record leaving the date blank - can you? 10. Change the validation for the Order_date so that it can be left blank. 11. Add another record leaving the date blank 12. Close and save the table
(Remember to use Ctrl ) Can you? 3. Change the index for Description to allow duplicates and add the second record again. 4. Close and save the table 5. Set the default value for Quantity in the Order_line table to 1 6. Add a new record 7. Close and save the table 8. Set the Supplier Name in Supplier as a required field 9. Try to add a record in Supplier without a Supplier_Name 10. Close and save the table
Page 6 of 13
Exercise 31. Changing header, footer and detail area size for Forms
1. Open the Supplier table and increase the detail area size 2. Open the Footer area 3. Open the Header area 4. Close the Header and Footer areas
Microsoft Access XP Beginners- Exercises Exercise 33. Adding simple Controls in Forms
1. In the OrderFrontEnd database open the Order form in Design view. 2. Add another bound control for the Supplier field. 3. Add another bound control for the Date field. 4. Change the text in the label for the new Date control to Date order placed 5. Add an unbound field with the label Type of Order. 6. Change to the form view and test the controls you have added. Move from record to record and note that what you type in the bound control is specific to the record in which you type it, while data you type in the unbound control stays there regardless of the record you are viewing 7. Close and save the form
5. Close and save the form 6. Open the Supplier form and make it look as shown right
Page 8 of 13
3. Close and save the form as Product_Supplier 4. Open the Supplier form in design view and drag the Product_Supplier form onto it. 5. Change to form view to test the form. (Note that Supplier_ID is not visible anywhere on either form, but exists and is used to connect the relevant information from the two tables.) 6. Close and save the Supplier form Creating a form/subform for viewing Orders and the order lines, that is the details of multiple products being ordered on each order. 7. Create a tabular form based on the Order line table.
Page 9 of 13
9.
10. Open the Order form in design view and drag the Order line form onto it. 11. Change to form view to test the form. 12. Close and save the Order form 13. Creating a form/subform for viewing Makers and the Products they make. 14. Create a tabular form based on the Product table. 15. Remove the Maker_ID field (this is common between the Maker and Product tables) and the Product_ID field (used by Access, of no interest to us!). The form should look as shown right 16. Close and save the form as Product 17. Open the Maker form in design view and drag the Product form onto it. 18. Change to form view to test the form. 19. Close and save the Maker form
Page 10 of 13
Microsoft Access XP Beginners- Exercises Exercise 41. Deleting tables from Queries (and why you might need to)
1. Open the Products table and note the Crystal Ballpen and Matt Photo Paper which exist in the table. 2. Open the Qry_Products Query and note that you cannot see any Crystal Ballpen and Matt Photo Paper. This Query is not giving a complete list of products! 3. Delete the Order and Order line tables from the Query (no fields from these have been used anyway!) 4. View the result of the query and note that Crystal Ballpen and Matt Photo Paper are now included in the list! Note that because we had the Order and Order_line tables included in the query we were asking for data which existed in all tables. Since no Crystal Ballpens or Matt Photo Paper have been ordered they do not exist in those tables and are therefore not included in the query. Now that you have removed the Order tables you will list all products which exist in the Product table. 5. Remove all criteria 6. Close and save the Query
Page 11 of 13
Microsoft Access XP Beginners- Exercises Exercise 44. Sorting Fields in a query and Showing fields
1. Sort the data in Qry_Product_Suppliers by Maker Name 2. View the datasheet 3. Sort the data by Supplier_Name 4. View the datasheet 5. Sort the data by Supplier_Name and then by Maker name, but keep the fields showing in their existing order 6. Add a criterion which makes the query only deal with suppliers in Notts 7. View the results (17) 8. Hide the County field 9. View the results 10. Remove all criteria and show the County field again 11. Sort by Supplier and then by Maker 12. Add the Supplier_ID field 13. Close and save the query
Page 12 of 13
Microsoft Access XP Beginners- Exercises Exercise 48. Saving, Changing Views and Printing Reports
1. Close and save the report as Rpt_Product_Suppliers 2. Create a report based on the Products query. 3. Close it and save it as Rpt_Products