New Perspectives Access 2013 Assignment-5

New Perspectives Access 2013

Tutorial 5: SAM Project 1a

PHYSICAL THERAPY SPECIALISTS, P.C.

creating specialized queries and enhancing a databaseName

 

New Perspectives Access 2013

Tutorial 5: SAM Project 1a

PHYSICAL THERAPY SPECIALISTS, P.C.

creating specialized queries and enhancing a databaseName

 

           

 

 

                                                                                                                            

 

PROJECT DESCRIPTION

Jennifer Christie wants to enhance the Physical Therapy Specialists database so she can generate specific data about the clinic's therapists, patients, billing, employees, and locations. She also wants to make changes to the tblLocation and tblPatient tables to streamline data entry. You'll create several queries to answer Jennifer's questions about where patients are located geographically, which employees have entry-level salaries, which patients live in the same household, which therapists have no billing records being processed, and the total payroll for each position at each clinic location.

 

GETTING STARTED

·         Download the following file from the SAM website:

o    NP_Access2013_T5_P1a_FirstLastName_1.accdb

·         Open the file you just downloaded and save it with the name:

o    NP_Access2013_T5_P1a_FirstLastName_2.accdb

o    Hint: If you do not see the .accdb file extension in the Save file dialog box, do not type it. Access will add the file extension for you automatically.

·         Open the _GradingInfoTable table and ensure that your first and last name is displayed as the first record in the table. If the table does not contain your name, delete the file and download a new copy from the SAM website.

 

PROJECT STEPS

1.            Create a query to find all records in the tblPatient table in which the Phone field value starts with the area code 234 with the following options:

a.    Display all fields from the tblPatient table in the query in the following order: PatientID, PatientFirst, PatientLast, Address, City, State, Zip, Phone, BirthDate, Gender.

b.    Sort the query in ascending order by the City field.

Save the query as qry234AreaCode, run the query, and then close it.

2.            Make a copy of the qry234AreaCode query using the new name qryNotDueberRichvilleWaco and make the following updates:

a.    Delete the condition from the Phone field.

b.    Add a new condition to find all records in the tblPatient table in which the City field values are not Dueber, Richville, or Waco. Use a list-of-values match for the selection criteria.

c.    If necessary, sort the query in ascending order by the City field. (Tip: Depending on how step 1 was completed, this query may already be sorted in ascending order by the City field.)

d.    Save and run the query, resize the Address column to best fit.

Save and close the query.

3.            Create a query to find all records from the tblEmployee table in which the MonthlySalary value is 1500, 1850, or 1875.  Use a list-of-values match for the selection criteria. The query should have the following options:

a.    Display all fields from the tblEmployee table in the query in the following order: EmployeeID, LocationID, First, Last, Title, Monthly Salary.

b.    Sort in descending order by the MonthlySalary field.

Save the query as qryEntryLevelSalaries, run the query, and then close it.

4.            Create a query to display all records from the tblTherapist table with the following options:

a.    Display the LocationID, Specialty, and Certification fields (in that order) from the tblTherapist table in the query.

b.    Sort the query in ascending order by the LocationID field.

c.    Add a calculated field named TherapistName as the first column in the query that concatenates the First field value, a space, and the Last field value.

d.    Set the Caption property for the TherapistName field to Therapist Name.

e.    Save the query as qryTherapistSpecialties, run the query, resize the Therapist Name column to its best fit.

Save and close the query.

5.            Create a parameter query to select the tblTherapist table records for a Certification field value that the user specifies using the following options:

a.    Display the LocationID, First, Last, Specialty, and Certification fields (in that order) in the query.

b.    Use Enter the certification: as the prompt associated with the Certification field prompt. If the user doesn't enter a Certification field value, the parameter query should select all records from the tblTherapist table.

c.    Sort the query in ascending order by the Last field.

d.    Save the query as qryCertificationParameter.

Confirm the parameter query is working correctly by running the query and entering no value as the Certification field value, and then run the query again and enter DPT as the Certification field value. Close the query.

6.            Create a find duplicates query based on the tblPatient table with the following options:

a.    Select the Address field as the field that might contain duplicates.

b.    Select the PatientID, PatientFirst, PatientLast, and Phone fields (in that order) as additional fields in the query recordset.

Save the query as qryDuplicateHouseholds, run the query, and then close it.

7.            Create a find unmatched query that finds all records in the tblTherapist table for which there is no matching record in the tblBilling table. Display the TherapistID, LocationID, First, Last, and HireDate fields from the tblTherapist table in the query recordset. Save the query as qryTherapistsWithoutMatchingBilling, run the query, and then close it.

8.            Create a query to display all fields from the tblEmployee table (in the following order: EmployeeID, LocationID, First, Last, Title, and Monthly Salary), sorted in descending order by MonthlySalary. Use the Top Values property to select the top five records. Save the query as qryTop5Salaries, run the query, and then close it.

9.            Open the tblLocation table in Design view. Change the ManagerID field to a lookup field with the following options:

a.    Specify the lookup field values will come from another table or query.

b.    Select the Last field and then the EmployeeID field from the tblEmployee table.

c.    Sort the values in ascending order by the Last field.

d.    Confirm the 'Hide the key column (recommended)' option is checked.

e.    Resize the lookup column to best fit

f.     Accept the default label for the lookup column.

g.    Save the changes and view the tblLocation table in Datasheet view.

h.    Change the Manager ID field value for the record with Location ID A to Eleby.

Close the table.

10.         Open the tblBilling table in Design view. Create a field validation rule for the Sessions field to only allow values >0. Enter Patients must participate in at least 1 session. as the validation text. Save and close the tables, clicking yes when warned about data integrity rule.

11.         Open the tblPatient table in Design view. Use the Input Mask Wizard to add an input mask to the Phone field. The input mask should use parentheses as separators for the area code, a space between the area code and the number, and a dash, as in (123) 456-7890 with only the last seven digits required; do not store the literal display characters, if you are prompted to do so. Save the tblPatient table and switch to Datasheet view. Change the Phone field value for the record with PatientID A10026 to 234-555-0001.

12.         View the tblPatient table in Design view and define a field validation rule for the Gender field in the tblPatient table. Acceptable field values for the Gender field are F or M (in that order). Use the message Must be F or M to notify a user who enters an invalid Gender field value. Save and close the table, clicking yes when warned about data integrity rules.

Switch to datasheet view and test the field validation rule for the Gender field, making sure any tested field values are the same as they were before your testing (by retyping the correct value or by pressing the Esc key), and then close the table.

13.         Create a crosstab query based on the tblEmployee table with the following options:

a.    Use the LocationID field values for the row headings

b.    Use the Title field values for the column headings.

c.    Use the sum of the MonthlySalary field values as the summarized value

d.    Include row sums.

e.    Save the query as qryMonthlySalaryByTitle.

f.     Run the query, resize the columns in the query recordset to their best fit.

Save and close the query.

 

Compact and repair your database, save your database, and exit Access. Follow the directions on the SAM website to submit your completed project.



NOTE:  1. Enter record in info table from your own database. It comntainms name, user id etc.
2. Rename the database as per convention.