Ann Arbor ASA ‘Up and Running’ Series: ACCESS Prepared by volunteers of the Ann Arbor Chapter of...
If you can't read please download the document
Ann Arbor ASA ‘Up and Running’ Series: ACCESS Prepared by volunteers of the Ann Arbor Chapter of the American Statistical Association, in cooperation with
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
Slide 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 Entry Foreign Keys Data Entry Screens and Data Reporting
2
Slide 3
Inefficiencies of Excel Excel SpreadsheetInefficiencies
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 3
Slide 4
Inefficiencies of Excel (continued) Inconsistent entries P
Black.,Dr. Peg Black. PREVENT accurate data tracking Leaving out an
entry Dr. Peg Black PREVENTS accurate data tracking 4
Slide 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 5
Slide 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 6
Slide 7
ADVANTAGES of Database Storage in Access: Reports Reports
enable you to group Look up list Of Patient Names Doctor Name Each
Patient 7
Slide 8
ADVANTAGES of Database Storage in Access: Applications Access
Data Entry Screens and Data Access Reports can be linked together
to create Access Applications 8
Slide 9
Access Database: First Access Database Screen Table:
Spreadsheet Rows of data Columns of data Database: Workbook
Collection of Spreadsheets or Tables 9
Slide 10
Simple Access Database To start MS Access Under the Start menu
Click on All Programs (Note, items on right side may be different)
Click on All Programs 10
Slide 11
Simple Access Database Under General Office Applications,
Microsoft Office 2007 folders Click on Microsoft Office Access 2007
Click on Microsoft Office Access 2007 11
Slide 12
Simple Access Database Click On Blank Database Click on Blank
Database 12
Slide 13
Simple Access Database Type in the database name (or file name)
database1 in the File_Name Text box. Click Create button Notice
that the directory structure of the database appears above the
create and cancel buttons 13 Directory Structure Type in database1
Click on Create button
Slide 14
Simple Access Database This screen appears When you click the
Create button. At this point you are ready to add fields to your
first table. Later on we will save this table and give it a name We
will give this table a name later on 14 We are adding fields to our
new table
Slide 15
Simple Access Database (Table Creation) Purpose to Create
tables doctor_information, Patient_information, and
patient_appointment. Add columns, rename columns, and manually
enter data. 15
Slide 16
Simple Access Database (Table Creation) Create Table Basics
AutoNumber: Unique Identifier: generated automatically when you
create a database Rename Column: Right click and chose rename. Type
column name. Click on add new field Move to next field: Type in the
name of the column and hit enter Change column data type: Go to the
data type list box and choose an appropriate data type. Default is
text ID field created automatically when you create a database
16
Slide 17
Simple Access Database Create Doctor_id Column by renaming ID
field. Right mouse click. Choose rename column. 17
Slide 18
Simple Access Database (Move to next field) Rename field Type
in doctor_id. Double click on add new field 18
Slide 19
Simple Access Database (Move to next field) Move to next field
Type first_name. Hit 19
Slide 20
Simple Access Database (Move to next field) Move to next field
Blank field appears. Cursor is on the blank field Cursor is on
blank field 20
Slide 21
Simple Access Database (Move to next field) Add next fields
last_name, address, city, state in the same fashion. Type each
field name. Hit 21
Slide 22
Simple Access Database (Move to next field) Add next fields
After adding last Field, state, and hitting Results are as follows:
Cursor is here 22
Slide 23
Simple Access Database (Move to next field) Modify data type
Add numeric field Zip. Type in zip Type in Zip 23
Slide 24
Simple Access Database (Move to next field) Modify data type
Next, Click on white space. Click on Data Type List box and choose
number (1) Click on white space (2) Click on DataT ype list box and
choose number Notice add New field label For next field 24
Slide 25
Simple Access Database (Move to next field) Modify data type
Double Click on Add new Field To the right of zip Repeat For the
soc number. The resulting screen Looks as follows: (1) Click on
white space (2) Click on DataT ype list box and choose number
25
Slide 26
Simple Access Database (Move to next field) Modify data type
Repeat process for hire_date Except for the Date type choose Date
time (1) Click on white space (2) Click on DataT ype list box and
choose number 26
Slide 27
Simple Access Database (Save Table) Save Table Click on
Upper-left corner disk icon Type doctor_information in dialog box.
1) Click on the disk icon to save the table. 2) Type in
doctor_information in dialog box 27
Slide 28
Simple Access Database (Save Table) Save Table Press OK in
dialog box. Results are as follows: 1) Click on the disk icon to
save the table. The table is called doctor_information 28
Slide 29
Simple Access Database (Create table for excercises) To create
the Tables for the Following exercises Click on Create 29 Click on
Create
Slide 30
Simple Access Database (Create table for excercises) Next click
On Table 30 Click on Table
Slide 31
Simple Access Database (Create table for excercises) You are
set to Add fields For your new Table. 31 You are set to add fields
for your new table
Slide 32
Simple Access Database (Exercise) Create tables
patient_information and patient_appointment table. The
patient_information table has the following layout:
Patient_idPatient_last_ name Patient_first _name Patient_mid dle
Patient_socPatient_add ress AutonumberText Numbertext
Patient_statePatient_cityPatient_zipDate_of_birt h Text NumberDate
time 32
Slide 33
Simple Access Database (Exercise continued) Create tables
patient_information and patient_appointment table. The
patient_appointment table has the following layout:
Patient_appointment has the followi Appt_idAppt_dat e
Doctor_idApp_descPatient_id Autonum ber Date timeNumberTextnumber
33
Slide 34
Simple Access Database: Manual Data Entry Doctor Information
data Open up doctor Information table to enter data You can right
mouse click on a table on the left side and click open 1) Click on
the disk icon to save the table. 34
Slide 35
Simple Access Database: Manual Data Entry Doctor Information
data Open up doctor Information table to enter data 1) Click on the
disk icon to save the table. 1)Right mouse click 2)Click Open
35
Slide 36
Simple Access Database: Manual Data Entry Doctor Information
data OR double click on 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 36
Slide 37
Simple Access Database: Manual Data Entry Doctor Information
data Data Entry Screen Appears 1) Click on the disk icon to save
the table. 1)Right mouse click 2)Click Open 1) past doctor id field
on to first name. 2)Type first name Gina 3) to last_name enter
Smith for last name 4)Continue tabbing and entering in fields
Cursor is here 37
Slide 38
Simple Access Database: Manual Data Entry Doctor Information
data Data Entry Screen Appears Doctor_id filled In automatically by
pressing Or Note: the Doctor_id shown on this slide may be
different than what you have since the ids are automatically
generated. 1) 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 38
Slide 39
Simple Access Database: Manual Data Entry Doctor Information
data Data Entry Screen Appears Continue Tabbing and Entering fields
1) Click on the disk icon to save the table. 1)Right mouse click
2)Click Open 1) past doctor id field on to first name. 2)Type first
name Gina 3) to last_name enter Anderson for last name 4) Continue
tabbing and entering in fields 39
Slide 40
Simple Access Database: Manual Data Entry Doctor Information
data Tab to each field Enter value Hit or to move To next field
1)Cursor is at address 2)Type 123 Lane for address 3) or for next
field 4)Continue adding rest of the Fields typing in Plymouth for
the city, MI for the state, 48170 for the zip, and 388888888 for
the soc 40
Slide 41
Simple Access Database: Manual Data Entry Doctor Information
data At the Hire_date field Enter in 07/07/2009. Time Defaults to
noon 1) Click on the disk icon to save the table. 1)Right mouse
click 2)Click Open 1) past doctor id field on to first name. 2)Type
first name Gina 3) to last_name enter Smith for last name
4)Continue tabbing and entering in fields 41
Slide 42
Simple Access Database: Manual Data Entry Doctor Information
data After entering In the hire_date hit. Results are as shown AND
data is saved to the table 1)Right mouse click 2)Click Open 42
Slide 43
Simple Access Database: Manual Data Entry Doctor Information
data After entering In the hire_date hit. Results are as shown AND
data is saved to the table 1)Right mouse click 2)Click Open 43
Slide 44
Simple Access Database: Manual Data Entry Doctor Information
data Note, you can delete a record by selecting a record, right-
clicking and choosing delete 1)Right mouse click 2)Click Open
44
Slide 45
Simple Access Database: Manual Data Entry Doctor Information
data Confirmation dialog box pops Up. Click OK 1)Right mouse click
2)Click Open 45
Slide 46
Simple Access Database: Manual Data Entry Doctor Information
data End result is as shown 1)Right mouse click 2)Click Open
46
Slide 47
Simple Access Database: Manual Data Entry (Exercise) Enter data
into the patient_information table. Add a record with the following
values (in order omitting double quotes): Mann, Bob, John,
380004444, 444 Lockwood, Novi, MI, 48170, 12/01/1970
Patient_idPatient_last_ name Patient_first _name Patient_mid dle
Patient_socPatient_add ress AutonumberText Numbertext
Patient_cityPatient_statePatient_zipDate_of_birt h Text NumberDate
time 47
Slide 48
Simple Access Database: Foreign Keys Purpose: 1)Creating
Relationships 2)Enforcing Integrity By Creating Child and Parent
tables you are creating RELATIONSHIPS 48
Slide 49
Simple Access Database: Foreign Keys: Creating Relationships
Parent tables And Child tables Fields in Child Table (patient
Appointment) reference Fields in Parent Tables (doctor _
information, patient_information) Patient_appointment Doctor_ID and
Patient_ID are foreign keys Values in Patient_appointment Doctor_ID
must Exist in Doctor_information Doctor_id Values in
Patient_appointment Patient_ID must exist in patient_information
Patient_id 49
Slide 50
Simple Access Database: Creating Foreign Keys Creates
Relationships: Bring Tables into ERD diagram Creating Child Tables
is how you CREATE RELATIONSHIPS Creating Child tables Go under
Database Tools and click on Relationships for a List of tables to
Bring into the ERD. Click on relationships for a list of tables to
bring into The ERD (Entity Relationship Diagram) 50
Slide 51
Simple Access Database: Creating Foreign Keys Creates
Relationships Creating Child table Next, Click on the
Doctor_information, Hold the key Click on Patient_information And
Patient_appointment 51
Slide 52
Simple Access Database: Creating Foreign Keys Creates
Relationships Create child Table Click Add Tables Appear In the ERD
52
Slide 53
Simple Access Database: Creating Foreign Keys Creates
Relationships Create child Table Left mouse Click on
Patient_appointment Move it down since It is the child table
53
Slide 54
Simple Access Database: Foreign Keys Create child Table Double
click On doctor_id Of doctor_information To bring up Relationship
window 54
Slide 55
Simple Access Database: Foreign Keys Create child Table Double
click On doctor_id Of doctor_information to bring up Relationship
window 55
Slide 56
Simple Access Database: Creating Foreign Keys Creates
Relationships Create child Table Patient_Appointment Left table
name choose Doctor_information. Right table Name choose
Patient_appointment 56
Slide 57
Simple Access Database: Foreign Keys Create child Table Left
column name choose Doctor_id. Right column Name choose Doctor_id
57
Simple Access Database: Foreign Keys Create child Table
Relationship is created 60
Slide 61
Simple Access Database: Foreign Keys: Creating Relationship
between patient_appointment and patient_information Child Table:
Patient Appointment Parent table: Patient Information Repeat for
Patient Information 1)1) 1)Choose Patient_information For left
table (parent Table) 2) Choose Patient_appointment For right table
(child table) 2) 61
Slide 62
Simple Access Database: Foreign Keys: Creating Relationship
between patient_appointment and patient_information Child Table:
Patient Appointment Parent table: Patient Information 1)1) 1)Choose
patient_id Columns from patient_information and patient_appointment
tables 2) 62
Slide 63
Simple Access Database: Foreign Keys: Creating Relationships
Create child Table Relationship is created Child Parent
Relationship You can double-click On the relationship To edit it
later on 63
Slide 64
Simple Access Database: Foreign Keys: Enforcing Integrity
Integrity Is enforced Can only use existing doctor ids of 5 or 6
(in this example). Note your doctor ids may be different 64
Slide 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 button for the data entry We create
data entry screens for the parent Tables first and then the child
tables 65
Slide 66
Data Entry Screens: Parent Tables Create Data Entry Screens
Doctor_ Information table 1)Click on create 2)Click on form design
66
Slide 67
Data Entry Screens: Parent Tables Create Data Entry Screens
Doctor_ Information table 1)Click on Add Existing Fields 67
Slide 68
Data Entry Screens: Parent Tables Create Data Entry Screens
Doctor_ Information table 1)Click on Add Existing Fields 68
Slide 69
Data Entry Screens: Parent Tables Create Data Entry Screens
Expand Doctor_ Information table Expand doctor_information 69
Slide 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 70
Slide 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
71
Slide 72
Data Entry Screens: Parent Tables: Doctor_Information: Creating
button to insert data Create Data Entry Screens (2)Click on Button
(3)Click on Record Operations 4) Click on Save Record 5) Click on
Finish (1)Click on Design Tab (1) (2) 72
Slide 73
Data Entry Screens: Parent Tables: Doctor_Information: OR much
simpler way to create a form Create Data Entry Screens 73 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
Slide 74
Data Entry Screens: Parent Tables: Doctor_Information: OR much
simpler way to create a form without dragging each field: Create
Data Entry Screens 74 1)After clicking on form, a form is created
automatically for the doctor_information Table.
Slide 75
Data Entry Screens: Parent Tables: Doctor_Information: OR much
simpler way to create a form without dragging each field: Create
Data Entry Screens 75 1)Click on the Save disk icon (1) Click on
Save disk icon
Slide 76
Data Entry Screens: Parent Tables: Doctor_Information: OR much
simpler way to create a form without dragging each field: Create
Data Entry Screens 76 1)Type in Doctor_information 2) Press OK.
Doctor_information Is saved as a form (1) Click on Save disk icon
(1) Type in doctor_information (2) Press OK
Slide 77
Data Entry Screens: Parent Tables: Doctor_Information: Design
mode: Add a button Add button to Data Entry Screen 77 1)Right-mouse
Click on the form Doctor_information 2) Click on Design View to Get
into Design View to add button. (1) Right click on form
doctor_information (2) Click on Design View
Slide 78
Data Entry Screens: Parent Tables: Doctor_Information: Design
mode: Add a button Add button to Data Entry Screen 78 1)Click on
the Button icon. (1) Click on the button
Slide 79
Data Entry Screens: Parent Tables: Doctor_Information: Design
mode: Add a button Add button to Data Entry Screen 79 (1)Drag
rectangle to the footer section and click (1)Drag rectangle to the
footer section and click
Slide 80
Data Entry Screens: Parent Tables: Doctor_Information: Design
mode: Add a button Choose action for button 80 (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
Slide 81
Data Entry Screens: Parent Tables: Doctor_Information: Design
mode: Add a button Name Button On Data Entry Screen 81 (1)Click on
Text (2) Type Add Record (3) Click on Next (1)Click on Text (2)
Type Add Record
Slide 82
Data Entry Screens: Parent Tables: Doctor_Information: Design
mode: Add a button Name Button On Data Entry Screen 82 (1)Type Add
Record (2) Click on Finish (1)Type Add Record (2) Click on
Finish
Slide 83
Data Entry Screens: Parent Tables: Doctor_Information: Design
mode: Add a button Run the form to enter a new record 83 (1)Double
click on Doctor Information form (1)Double click on Doctor
Information form
Slide 84
Data Entry Screens: Parent Tables: Doctor_Information: Design
mode: Add a button Run the form to enter a new record 84 (1)Tab
past doctor_id and enter In the following Fields 2) Press Add
Record to add the record Press Add Record to add the record
Slide 85
Data Entry Screens: Parent Tables: Doctor_Information: Design
mode: Add a button Run the form to enter a new record 85 (1)Record
has been added
Slide 86
Data Entry Screens: Parent Tables: (Exercise) Add a data entry
screen for Patient Information and add a button to Add a record.
BONUS: Add another Button to delete a record 86
Slide 87
Data Entry Screens: Child Tables: Patient_Appointment with a
look-up list of doctors Build form from patient_ Appointment Table
87 (1)Select patient_ Appointment table (2)Choose create (3)Choose
form
Slide 88
Data Entry Screens: Child Tables: Patient_Appointment with a
look-up list of doctors Build form from patient_ Appointment Table
88 (1)Form is created For patient_ Appointment 2) Right click On
patient_ Appointment 3) Click on design view
Slide 89
Data Entry Screens: Child Tables: Patient_Appointment with a
look-up list of doctors Build drop Down list For doctors 89
(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 first option is selected. Click Next
Slide 90
Data Entry Screens: Child Tables: Patient_Appointment with a
look-up list of doctors Choose Source for Drop down list of doctors
90 (1)Choose Doctor_information to populate the drop Down list. (2)
Click Next (1)Choose Doctor_information to populate the drop Down
list.
Slide 91
Data Entry Screens: Child Tables: Patient_Appointment with a
look-up list of doctors Choose fields for Drop down list of doctors
91 (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
Slide 92
Data Entry Screens: Child Tables: Patient_Appointment with a
look-up list of doctors Choose Sorting for Drop down list 92
(1)Choose last_name. (2) Click Next (1) Choose last_name. (2) Click
Next
Slide 93
Data Entry Screens: Child Tables: Patient_Appointment with a
look-up list of doctors Hide the Key column 93 (1)Make sure hide
key Column option is chosen (2) Click Next (1)Make sure hide key
Column option is chosen. (2) Click Next
Slide 94
Data Entry Screens: Child Tables: Patient_Appointment with a
look-up list of doctors Store value In lookup list 94 (1)Make sure
store value 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_id From drop_down (3) Click
finish
Slide 95
Data Entry Screens: Child Tables: Patient_Appointment with a
look-up list of doctors Doctor Lookup list created 95 (1)When You
bring up The patient_ Appointment form (by double-clicking on this
form) you see the drop down of doctors.
Slide 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) 96
Slide 97
Data Entry Screens: End Result Have pull down for doctor and
Patients Have button to insert 97
Slide 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 from Patient_appointment,
Doctor_information, And Patient_information. 2)Choose how you want
to group your data 98
Slide 99
Data Reporting: Creating Simple Data Reports with the Reporting
Wizard : fields Create Reports (2)Click on (3)Report Wizard (1)
Click on Create (1) (2) 99
Slide 100
Data Reporting: Creating Simple Data Reports with the Reporting
Wizard : fields Create Reports Patient_appointment fields (1) (2)
1)Choose patient_appointment for the table 2) 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 100
Slide 101
Data Reporting: Creating Simple Data Reports with the Reporting
Wizard : fields Create Reports Doctor Information fields (1) (2)
1)Choose Doctor_information for the table 2) 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. 101
Slide 102
Data Reporting: Creating Simple Data Reports with the Reporting
Wizard : fields Create Reports Patient Information fields (1) (2)
1)Choose Patient_Information for the table 2) 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. 102
Slide 103
Data Reporting: Creating Simple Data Reports with the Reporting
Wizard : Grouping Choose How you Want to Group your data Gives you
flexibility in grouping data Choose doctor_information 103
Slide 104
Data Reporting: Hit Next and Finish. End Result: Doctor Name
Each Patient 104
Slide 105
Data Reporting: Can also group report by Patient Information
Patient Each Doctor Appointment 105
Slide 106
Data Queries: Joining tables together Example of A query
joining Tables to obtain Doctor name and Patient name for
appointments (1) (2) 1)Choose patient_appointment for the table 2)
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 106 SELECT first_name,
last_name, patient_First_name, patient_last_name, appt_date FROM
doctor_information AS t1, patient_appointment AS t2,
patient_information AS t3 WHERE t1.doctor_id = t2.doctor_id and
t2.patient_id = t3.patient_id;
Slide 107
Data Queries: Joining tables together (continued) Add first
name And last name Parameters to The query. Use Brackets ([]) (1)
(2) 1)Choose patient_appointment for the table 2) 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 107 SELECT first_name, last_name,
patient_First_name, patient_last_name, appt_date FROM
doctor_information AS t1, patient_appointment AS t2,
patient_information AS t3 WHERE t1.doctor_id = t2.doctor_id and
t2.patient_id = t3.patient_id and first_name = [first name] and
last_name = [last name]; ; last name parameter First name
parameter
Slide 108
Data Reports: Use the query (query22) in the report
(reportthatquery) Use query22 As the source For the report Using
the report wizard (1) (2) 1)Choose patient_appointment for the
table 2) 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 108 SELECT
first_name, last_name, patient_First_name, patient_last_name,
appt_date FROM doctor_information AS t1, patient_appointment AS t2,
patient_information AS t3 WHERE t1.doctor_id = t2.doctor_id and
t2.patient_id = t3.patient_id and first_name = [first name] and
last_name = [last name]; ; First name parameter Query22 as Source
for report
Slide 109
Data Reports: Run the report ReportThatQuery Run the report
ReportThatQuery And type in Parameter First name. Hit OK (1) (2)
1)Choose patient_appointment for the table 2) 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 109 SELECT first_name, last_name,
patient_First_name, patient_last_name, appt_date FROM
doctor_information AS t1, patient_appointment AS t2,
patient_information AS t3 WHERE t1.doctor_id = t2.doctor_id and
t2.patient_id = t3.patient_id and first_name = [first name] and
last_name = [last name]; ; First name parameter Query22 as Source
for report
Slide 110
Data Reports: Run the report ReportThatQuery Run the report
ReportThatQuery And type in Parameter Last name. Hit OK (1) (2)
1)Choose patient_appointment for the table 2) 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 110 SELECT first_name, last_name,
patient_First_name, patient_last_name, appt_date FROM
doctor_information AS t1, patient_appointment AS t2,
patient_information AS t3 WHERE t1.doctor_id = t2.doctor_id and
t2.patient_id = t3.patient_id and first_name = [first name] and
last_name = [last name]; ; First name parameter Query22 as Source
for report
Slide 111
Data Reports: Run the report ReportThatQuery Now we have a
report with NAMES and not IDs for Julie Keros (1) (2) 1)Choose
patient_appointment for the table 2) 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 111 SELECT first_name, last_name, patient_First_name,
patient_last_name, appt_date FROM doctor_information AS t1,
patient_appointment AS t2, patient_information AS t3 WHERE
t1.doctor_id = t2.doctor_id and t2.patient_id = t3.patient_id and
first_name = [first name] and last_name = [last name]; ; First name
parameter Query22 as Source for report
Slide 112
Combining forms and reports into an MS Access application using
Macros You can call the Macro AutoExec To have it execute As soon
as the Database opens Have add record, Delete record, and find
Record functionality combined on One form (1) (2) (1) Choose field
112 SELECT first_name, last_name, patient_First_name,
patient_last_name, appt_date FROM doctor_information AS t1,
patient_appointment AS t2, patient_information AS t3 WHERE
t1.doctor_id = t2.doctor_id and t2.patient_id = t3.patient_id and
first_name = [first name] and last_name = [last name]; ; First name
parameter Query22 as Source for report
Slide 113
Create a new macro Click on create tab Click under module Click
macro 113
Slide 114
Create a new module Click on create tab Click under module
Click module 114
Slide 115
Make a function in the module 115 Option Compare Database
Public Function ImportTable() 'Turn off any warning messages
Application.DoCmd.SetWarnings False Application.DoCmd.CopyObject
"dbdemonew.accdb", "doctor_information", acTable,
"doctor_information" 'Turn warning messages back on
Application.DoCmd.SetWarnings True End Function Function Is called
ImportTable
Slide 116
Make a macro to call the module 116 Click on run code Choose
ImportTable
Slide 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. 117
Slide 118
Questions 118
Slide 119
119 Resources Training from CSCAR http://www.umich.edu/~cscar/
Statistical Analysis with R -- October 20, 9am-5pm Statistical
Analysis with R Intermediate SAS -- October 25, 27 + 29,
9am-12:30pm Intermediate SAS Using ArcGIS -- October 26 + 28,
9am-5pm Using ArcGIS Applied Structural Equation Modeling --
November 1, 2 + 3, 9am-5pm Applied Structural Equation Modeling
Introduction to NVivo -- November 9 + 11, 9am-12:30pm Introduction
to NVivo Applications of Hierarchical Linear Models -- November 8,
10 + 12 Applications of Hierarchical Linear Models Introduction to
Programming in Stata -- November 9, 11, 16 + 18, 1pm-4:30pm
Introduction to Programming in Stata Regression Analysis --
November 17 + 19 Regression Analysis Classification and Regression
Trees Using JMP -- December 2 + 3 Classification and Regression
Trees Using JMP
Slide 120
120 Other Workshops from Ann Arbor ASA Stata Statistics with
Excel R MS Access SAS