Ann Arbor ASA ‘Up and Running’ Series: ACCESS Prepared by volunteers of the Ann Arbor Chapter of the American Statistical Association, in cooperation with the Department of Statistics and the Center for Statistical Consultation and Research of the University of Michigan
Ann Arbor ASA ‘Up and Running’ Series: ACCESS. Prepared by volunteers of the Ann Arbor Chapter of the American Statistical Association, in cooperation with the Department of Statistics and the Center for Statistical Consultation and Research of the University of Michigan. PURPOSE: - PowerPoint PPT Presentation
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Ann Arbor ASA‘Up and Running’ Series:
ACCESS
Prepared by volunteers of the Ann Arbor Chapter of the American Statistical Association,
in cooperation with the Department of Statistics and the Center for Statistical Consultation and Research
of the University of Michigan
2
PURPOSE: • INEFFICIENCIES of Data Storage in Excel• ADVANTAGES of Data Storage in Access• Simple Access Database:
Creation of tables:doctor_information, patient_information,
patient_appointment Manual Data EntryForeign Keys
• Data Entry Screens and Data Reporting
3
Inefficiencies of Excel
Excel Spreadsheet Inefficiencies
• Disorganized, multiple entries for Dr. Peg Black.
• Tedious cutting and pasting required for reports on Dr. Peg Black.
• Difficult tracking of monthly, weekly and daily appointments
• Not multi-user• Tedious data entry
4
Inefficiencies of Excel (continued)
Doctor Patient Appointment Dr. John Smith Jane Dwight 11/2/2009 8:00am Dr. Peg Black Bob Carlson 01/2/2009 8:00am Dr. George Frank Peter Townsend 3/2/2009 8:00am Dr. George Frank Peter Townsend 3/3/2009 8:00am Dr. George Frank Linda Garner 3/4/2009 11:00am Dr. George Frank Linda Garner 3/4/2009 1:00pm Dr. George Frank Robert Hendrick 2:00pm 3/4/2009 Dr. George Frank Robert Hendrick 2:00pm 3/5/2009 Dr. Peg Black Bob Carlson 01/3/2009 8:00am Dr. John Smith Jane Dwight 11/3/2009 9:00am Dr. George Frank Lucy Schwartz 11/4/2009 9:00am Dr. Peg Black Bob Carlson 01/3/2009 8:00am Dr. George Frank Linda Garner 9/4/2009 1:00pm Dr. Peg Black Bob Carlson 01/4/2009 8:00am Dr. George Frank Linda Garner 8/4/2009 1:00pm P. Black Bob Carlson 01/5/2009 8:00am
Dr. John Smith Mary Yates 11/4/2009 9:00am Dr. John Smith Jane P. Dwight 11/5/2009 9:00am Dr. Peg Black Bob Carlson 01/6/2009 8:00am
Bob Carlson 01/7/2009 8:00am Dr. George Frank Linda Garner 8/4/2009 1:00pm Dr. George Frank Lucy Schwartz 7/4/2009 9:00am Dr. John Smith Andrew Taylor 11/6/2009 9:00am
Carol Henderson 01/8/2009 8:00am Dr. Peg Black Carol Henderson 01/9/2009 8:00am Dr. Peg Blck Carol Henderson 01/10/2009 8:00am Dr. John Smith Cal Hanks 11/7/2009 9:00am Dr. John Smith Ben Biggs 11/7/2009 9:00am Dr. George Frank Lucy Schwartz 7/8/2009 9:00am
• Inconsistent entries P Black. ,Dr. Peg Black. PREVENT accurate data tracking
• Leaving out an entry Dr. Peg Black PREVENTS accurate data tracking
5
ADVANTAGES of Database Storage in Access: Data Entry Screens
• Data Entry Screens
produce list of valid doctor names
• No room for data entry
mistakes
Look up list Of Doctors Names
6
ADVANTAGES of Database Storage in Access: Data Entry Screens
• Data Entry Screens
produce list of valid patient names too.
• No room for data entry
mistakes
Look up list Of Patient Names
7
ADVANTAGES of Database Storage in Access: Reports
• Reports enable you
to group
Look up list Of Patient Names
Doctor NameEach Patient
8
ADVANTAGES of Database Storage in Access: Applications
• Access Data Entry Screens and Data AccessReports can be linked together to create AccessApplications
9
Access Database:First Access Database Screen
• Table: Spreadsheet – Rows of data– Columns of data
• Database: Workbook– Collection of
Spreadsheets or Tables
10
Simple Access Database
• To start MSAccess Under the Start menu Click on All Programs (Note, items on right side may be different) Click on
• Create tables patient_information and patient_appointment table. The patient_appointment table has the following layout:
• Patient_appointment has the followiAppt_id Appt_date
Doctor_id App_desc Patient_id
Autonumber
Date time Number Text number
34
Simple Access Database: Manual Data Entry
• DoctorInformation data
• Open up doctorInformation tableto enter data
• You can right mouse click on a table on the leftside and click open
1) Click on the disk icon to save the table.
35
Simple Access Database: Manual Data Entry
• DoctorInformation data
• Open up doctorInformation tableto enter data
1) Click on the disk icon to save the table.
1) Right mouse click
2) Click Open
36
Simple Access Database: Manual Data Entry
• DoctorInformation data
• OR double clickon doctor_information : Table
1) Click on the disk icon to save the table.
1) Right mouse click
2) Click Open
1) Double click on doctor_information table
37
Simple Access Database: Manual Data Entry
• DoctorInformation data
• Data EntryScreen Appears 1) Click on the disk icon to save the table.
1) Right mouse click
2) Click Open1) <Tab> past doctor id field on to first name.2) Type first name “Gina”3) <Tab > to last_name enter “Smith” for last name4) Continue tabbing and entering in fields
Cursor is here
38
Simple Access Database: Manual Data Entry
• DoctorInformation data• Data EntryScreen Appears• Doctor_id filled In automaticallyby pressing <tab>Or <enter>
Note: the Doctor_id shownon this slide may be different than whatyou have since the idsare automatically generated.
1) <Tab> past doctor id field on to first name.2) Cursor is here
1) As soon as you start typing on the first_name field …
the doctor_id field is populated
39
Simple Access Database: Manual Data Entry
• DoctorInformation data
• Data EntryScreen Appears
• ContinueTabbing and Entering fields
1) Click on the disk icon to save the table.
1) Right mouse click
2) Click Open1) <Tab> past doctor id field on to first name.2) Type first name “Gina”3) <Tab > to last_name enter “Anderson” for last name4) Continue tabbing and entering in fields
40
Simple Access Database: Manual Data Entry
• DoctorInformation data
• Tab to each field• Enter value• Hit <Tab> or <Enter> to moveTo next field
1) Cursor is at address2) Type “123 Lane” for address3) <Tab> or <Enter> for next field4) Continue adding rest of the Fields typing in “Plymouth” for the city, “MI” forthe state, “48170” for the zip, and “388888888”for the soc
41
Simple Access Database: Manual Data Entry
• DoctorInformation data
• At theHire_date fieldEnter in 07/07/2009. TimeDefaults to noon
1) Click on the disk icon to save the table.
1) Right mouse click
2) Click Open1) <Tab> past doctor id field on to first name.2) Type first name “Gina”3) <Tab > to last_name enter “Smith” for last name4) Continue tabbing and entering in fields
42
Simple Access Database: Manual Data Entry
• DoctorInformation data
• After enteringIn the hire_datehit <enter>. Results are asshown AND data is saved tothe table
1) Right mouse click
2) Click Open
43
Simple Access Database: Manual Data Entry
• DoctorInformation data
• After enteringIn the hire_datehit <enter>. Results are asshown AND data is saved tothe table
1) Right mouse click
2) Click Open
44
Simple Access Database: Manual Data Entry
• DoctorInformation data
• Note, you can delete arecord by selecting arecord, right-clicking and choosing delete
1) Right mouse click
2) Click Open
45
Simple Access Database: Manual Data Entry
• DoctorInformation data
• Confirmationdialog box popsUp. Click OK
1) Right mouse click
2) Click Open
46
Simple Access Database: Manual Data Entry
• DoctorInformation data
• End resultis as shown
1) Right mouse click
2) Click Open
47
Simple Access Database: Manual Data Entry (Exercise)
• Enter data into the patient_information table. Add a record with the following values (in order –
Can only use existing doctor ids of 5 or 6 (in this example). Note your doctor ids may be different
65
Data Entry Screens: Easy way to enter data
Purpose of Data Entry Screens: • To enter the data in a fast and efficient way• To keep data organized • We build data entry screens by choosing
tables and columns and then adding a buttonfor the data entry
• We create data entry screens for the parent Tables first and then the child tables
66
Data Entry Screens: Parent Tables
• Create Data Entry Screens
• Doctor_Information table
1) Click on create2) Click on form design
67
Data Entry Screens: Parent Tables
• Create Data Entry Screens
• Doctor_Information table
1) Click on Add ExistingFields
68
Data Entry Screens: Parent Tables
• Create Data Entry Screens
• Doctor_Information table
1) Click on Add ExistingFields
69
Data Entry Screens: Parent Tables
• Create Data Entry Screens
ExpandDoctor_Information table
Expand doctor_information
70
Data Entry Screens: Parent Tables:Doctor_Information
• Create Data Entry Screens
Drag doctor id field to edge of second square
Drag first_name field to edge of second square
71
Data Entry Screens: Parent Tables:Doctor_Information
• Create Data Entry Screens
Drag each field to edge of second square
Drag each field to edge of second square.Hire_date is the last field
72
Data Entry Screens: Parent Tables: Doctor_Information: Creating button
to insert data
• Create Data Entry Screens
(2) Click on Button
(3) Click on RecordOperations
4) Click on Save Record
5) Click on Finish
(1) Click on Design Tab
(1)(2)
73
Data Entry Screens: Parent Tables: Doctor_Information: OR much simpler way
to create a form
• Create Data Entry Screens
1) Click on doctor_Information table
2) Click on create
3) Click on Form NOT Form Design
(1) Click on doctor_information
(2) Click on Create
(3) Click on Form
74
Data Entry Screens: Parent Tables: Doctor_Information: OR much simpler way
to create a form without dragging each field:
• Create Data Entry Screens
1) After clickingon form, a form is created automaticallyfor the‘doctor_information’Table.
75
Data Entry Screens: Parent Tables: Doctor_Information: OR much simpler way
to create a form without dragging each field:
• Create Data Entry Screens
1) Click on the Save disk icon
(1) Click on Save disk icon
76
Data Entry Screens: Parent Tables: Doctor_Information: OR much simpler way
to create a form without dragging each field:
• Create Data Entry Screens
1) Type inDoctor_information
2) Press OK. Doctor_informationIs saved as a form
(1) Click on Save disk icon
(1) Type in doctor_information(2) Press OK
77
Data Entry Screens: Parent Tables: Doctor_Information: Design mode: Add a button
• Add buttonto Data EntryScreen
1) Right-mouseClick on the formDoctor_information
2) Click on Design View to Get into DesignView to add button.
(1) Right click on form doctor_information
(2) Click on Design View
78
Data Entry Screens: Parent Tables: Doctor_Information: Design mode: Add a button
• Add buttonto Data EntryScreen
1) Click on the Button icon.
(1) Click on the button
79
Data Entry Screens: Parent Tables: Doctor_Information: Design mode: Add a button
• Add buttonto Data EntryScreen
(1) Drag rectangle to the footer section and click
(1) Drag rectangle to the footer section and click
80
Data Entry Screens: Parent Tables: Doctor_Information: Design mode: Add a button
• Choose action for button
(1) Click on Record Operations
(2) Click on Add New Record
(1) Click on Record Operations
(2) Click on Add New Record
(3) Click on Next(3) Click on Next
81
Data Entry Screens: Parent Tables: Doctor_Information: Design mode: Add a button
• NameButtonOn Data EntryScreen
(1) Click on Text
(2) Type Add Record
(3) Click on Next(3) Click on Next
(1) Click on Text(2) Type Add Record
82
Data Entry Screens: Parent Tables: Doctor_Information: Design mode: Add a button
• NameButtonOn Data EntryScreen
(1) Type Add Record
(2) Click on Finish
(1) Type Add Record
(2) Click on Finish
83
Data Entry Screens: Parent Tables: Doctor_Information: Design mode: Add a button
• Runthe formto entera new record
(1) Double click on Doctor Information form
(1) Double click on Doctor Information form
84
Data Entry Screens: Parent Tables: Doctor_Information: Design mode: Add a button
• Runthe formto entera new record
(1) Tab pastdoctor_idand enter In the followingFields
2) Press Add Recordto add the record
Press Add Recordto add the record
85
Data Entry Screens: Parent Tables: Doctor_Information: Design mode: Add a button
• Runthe formto entera new record
(1) Record hasbeen added
86
Data Entry Screens: Parent Tables: (Exercise)
• Add a data entry screen for Patient Information andadd a button to Add a record. BONUS: Add anotherButton to delete a record
87
Data Entry Screens: Child Tables: Patient_Appointment with a look-up list of doctors
• Build formfrom patient_AppointmentTable
(1) Select patient_Appointment table(2) Choose create(3) Choose form
88
Data Entry Screens: Child Tables: Patient_Appointment with a look-up list of doctors
• Build formfrom patient_AppointmentTable
(1) Form is createdFor patient_Appointment
2) Right clickOn patient_Appointment
3) Click on design view
89
Data Entry Screens: Child Tables: Patient_Appointment with a look-up list of doctors
• Build dropDown listFor doctors
(1) Click on Drop down list
2) Drag it to the detail part of the form
3) Notice the dialog box comes up. Make sure first option is selected. Click Next
(1) Click on Drop down list
2) Drag it to the detail Part of the form
(3) Notice the dialog box comes up. Make sure the firstoption is selected.Click Next
90
Data Entry Screens: Child Tables: Patient_Appointment with a look-up list of doctors
• Choose Source for Drop down listof doctors (1) Choose
Doctor_informationto populate the drop Down list .
(2) Click Next
(2) Click Next
(1) Choose Doctor_informationto populate the drop Down list .
91
Data Entry Screens: Child Tables: Patient_Appointment with a look-up list of doctors
• Choose fields for Drop down listof doctors (1) Choose last_name.
Click >.
2) Choose first_name. Click >.
(3) Click Next
(1) Choose last_name.Click >.
2) Choose first_name. Click >.
3) Click Next
92
Data Entry Screens: Child Tables: Patient_Appointment with a look-up list of doctors
• Choose Sorting for Drop downlist (1) Choose last_name.
(2) Click Next
(1) Choose last_name.
(2) Click Next
93
Data Entry Screens: Child Tables: Patient_Appointment with a look-up list of doctors
• Hide theKey column
(1) Make sure hide keyColumn option is chosen
(2) Click Next
(1) Make sure hide key Column option is chosen.
(2) Click Next
94
Data Entry Screens: Child Tables: Patient_Appointment with a look-up list of doctors
• Store valueIn lookup list
(1) Make sure storevalue in field option is chosen
(2) Choose doctor_id From drop down
(3) Click finish
(1) Make sure store value in field option is chosen.
(2) Choose doctor_idFrom drop_down
(3) Click finish
95
Data Entry Screens: Child Tables: Patient_Appointment with a look-up list of doctors
• DoctorLookup listcreated
(1) When You bring upThe patient_Appointment form(by double-clickingon this form) yousee the drop downof doctors.
96
Data Entry Screens: Parent Tables: (Exercise)
• Add another drop down list on the patient_appointment form to show a drop down
of PATIENTS (from the patient_information table)
97
Data Entry Screens: End Result
Have pull down for doctor and Patients
Have button to insert
98
Data Reporting Purpose: Fields and grouping
• Data Reporting Purpose:1) Choose fields that you want to include on the report . We will be choosing fields fromPatient_appointment, Doctor_information, And Patient_information.2) Choose how you want to group your data
99
Data Reporting: Creating Simple Data Reportswith the Reporting Wizard : fields
• CreateReports
(2) Click on (3) Report Wizard
(1) Click on Create
(1)(2)
100
Data Reporting: Creating Simple Data Reportswith the Reporting Wizard : fields
• CreateReportsPatient_appointment fields
(1)(2)
1) Choose patient_appointment for the table2) Choose appt_date from left side and hit arrow
to move it to the right side.3) Choose appt_desc from left side and hit
Arrow (->) to move it to right side.
(1) Choose field
(2) Hit Arrow
101
Data Reporting: Creating Simple Data Reportswith the Reporting Wizard : fields
• CreateReportsDoctor Information fields
(1)(2)
1) Choose Doctor_information for the table2) Choose first_name from left side and hit arrow
to move it to the right side.3) Choose last_name from left side and hit
Arrow (->) to move it to right side.
102
Data Reporting: Creating Simple Data Reportswith the Reporting Wizard : fields
• CreateReportsPatient Information fields
(1)(2)
1) Choose Patient_Information for the table2) Choose Patient_first_name from left side and hit arrow
to move it to the right side.3) Choose patient_last_name from left side and hit
Arrow (->) to move it to right side.
103
Data Reporting: Creating Simple Data Reportswith the Reporting Wizard : Grouping
• ChooseHow you Want to Group yourdata
Gives you flexibility in grouping data
Choose doctor_information
104
Data Reporting: Hit Next and Finish. End Result:
Doctor NameEach Patient
105
Data Reporting: Can also group report by Patient Information
PatientEach Doctor Appointment
117
Conclusion
MS Access is an easy and efficient way to store Data and enables you to build Tables, Data Entry Screens, Reports, and Applications.
Questions
118
119
ResourcesTraining from CSCAR
http://www.umich.edu/~cscar/
• Statistical Analysis with R -- October 20, 9am-5pm• Intermediate SAS -- October 25, 27 + 29, 9am-12:30pm• Using ArcGIS -- October 26 + 28, 9am-5pm• Applied Structural Equation Modeling -- November 1, 2 + 3, 9am-5pm• Introduction to NVivo -- November 9 + 11, 9am-12:30pm• Applications of Hierarchical Linear Models -- November 8, 10 + 12• Introduction to Programming in Stata -- November 9, 11, 16 + 18, 1pm-4:30pm• Regression Analysis -- November 17 + 19• Classification and Regression Trees Using JMP -- December 2 + 3