7
Mrs Neal May 2004 ADVANCED ACCESS SKILLS Introduction This guide will help you to develop your MS Access skill to an advanced level. You are required to demonstrate your abilities within the implementation section of your project. You are expected to implement your solution unaided, to a high quality with no defects. Scenario A local Beauty Spa currently records all appointments manually. The Spa has six Beauty consultants all are able to provide treatments on offer. The computerised system must prevent double- bookings, be easy to use and re-useable. Tables Task 1. Create the following tables, using appropriate use of validation rules, input masks, field sizes, indexes, default values and the required option:

Doublebookings1

  • Upload
    jthsict

  • View
    309

  • Download
    0

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Doublebookings1

Mrs Neal May 2004

ADVANCED ACCESS SKILLS

Introduction

This guide will help you to develop your MS Access skill to an advanced level. You are required to demonstrate your abilities within the implementation section of your project. You are expected to implement your solution unaided, to a high quality with no defects.

Scenario

A local Beauty Spa currently records all appointments manually. The Spa has six Beauty consultants all are able to provide treatments on offer. The computerised system must prevent double-bookings, be easy to use and re-useable.

Tables

Task 1. Create the following tables, using appropriate use of validation rules, input masks, field sizes, indexes, default values and the required option:

Indexes

No Don’t index the fieldYes (DuplicatesOK) Most of the time you want to allow duplicate

records. Yes (No Duplicates) Key fields should be set to No Duplicates

because a key field must be unique. You don’t want two customers with the same customer number.

Page 2: Doublebookings1

Mrs Neal May 2004

Validation

At A Level standard you should be creating validation rules and validation text (message that is displayed to user if data is incorrect) along side input masks to ensure the integrity of data entered into your database. Below are some examples of how validation can be used. You can mix and match the operators as appropriate:

Field Type

Validation Rule Definition

Number >10 Must be greater than 10Number <> 12 Cannot be 12Number >=5 Greater then or equal t5Number > 20 And < 200 Must be between 20 and

200 (non inclusive)Number >= 20 And <=200 Must be between 20 and

200 (inclusive)Number <= 30 Or >=100 Must be lower than 30 or

greater than 100 (inclusive)Date >= Date () Must be today’s date or laterDate >= Date () or Is Null Must be today’s date, later

or blankDate < Date () Must be earlier than today’s

dateDate >= #1/1/96# And <#1/1/97# Must be a date in 1996Text Like "A????" Entry must contain 5 characters

and start with the letter A

Input Masks

At A Level standard you should be creating inputs marks yourself and not using the wizard. Few projects are more gratifying than making things yourself. All input masks must be shown on your table designs. Below are the codes most commonly used:

Required Action Required Code Optional CodeNumbers 0-9 only 0 9Letters A to Z only L ?Letters or numbers A aAny character or space & C

Relationships

Page 3: Doublebookings1

Mrs Neal May 2004

Task 2. Create the following relationships, click the Relationships icon:

Data Entry

Task 3. Enter the following records into appropriate tables:

Linking tbl_Avaliable_Appointments to tbl_Client_Appointments

Page 4: Doublebookings1

Mrs Neal May 2004

Queries

The main functionality of this system is to allow appointment booking and prevent double bookings. The first set of queries are use to prevent double bookings of appointments – solution given by http://www.advanced-ict.info/

Task 4. The first query locates appointments that have been booked for a certain therapist on a certain date. Create this query as shown below:

Task 5. You now need to create a query that searches for appointments that have been booked on a particular day and deletes these from available appointments:

The query includes tbl_Avaliable_Appointments and qry_appointments-on-certain-dates – you must add these tables.

Create a relationship between the tables.

Right-click and select Join Properties.

Select the second option – Include ALL records and click OK.

Complete the query by entering the following criteria:

Page 5: Doublebookings1

Mrs Neal May 2004

Task 6. Your system is required to be reusable – within this task you will learn how to archive data that is no longer needed. Archiving reduces information load within the main table. You will need to create two advanced queries to perform this operation.

Within the database window – right-click tbl_Client_Appointments and select Copy:

Right-click again and select Paste.

Type in the following table name:

Start a new query, add tble_Client_Appointments and select all fields.

Select Query from the toolbar and choose Append Query: