Using the SDT in Access ARSI Training Andrea Peach, Georgetown College During our training, we used Access to create queries for accessing the Student Data Tool. This tutorial will remind you how we: 1. opened the database using Access 2. created a query using a wizard 3. create a report based on the query 4. copied the data in the query and pasted it into Excel 5. output the report into a Word document Open the database using Access On the CD, you were provided with two Access files. One of them has your district or school name in the file name. This is the file you will be using. To use this file, do the following: 1. Right-click on the file on your CD 2. Choose Copy 3. On your PC, decide where you want to put the database. For example, you might want to put the file on your desktop or somewhere under the My Documents folder. Using My Computer, go to where you want to put the file. 4. Right-click and choose Paste. 5. You should see the icon for the database file. Right-click on the icon and choose Properties 6. Make sure the Read-Only item is NOT CHECKED. Click OK. 7. Now, double-click on the icon. This should launch Access and the database. Create a query using a wizard When you open the database, you will see one table (DATA). You will also see some choices on the left side of the screen. For this activity, you should choose the Query option. Remember, a query is a question! I know you have a lot of questions about this data. So, the first step is to jot down some of the questions that you have. For example, you might ask the question How many 4 th grade girls scored proficient in a specific area Write your questions on the lines below:
Now that you have some questions, you need to decide if the answer to the question resides in your data. To determine this, you should be somewhat familiar with the different fields that are contained in the data. There is a file on your cd that contains a list of all of the available data fields. You can refer to this list to determine which fields that you will include in your query. Looking at this list, see if you can rewrite your questions from above using the proper field name. Now, let s create our query in Access. We will use the Query Wizard to help us. Remember, a wizard asks questions that help you create your query. 1. Click the Query Wizard link. 2. Click on the fields that you want to examine. Use your rewritten questions above to determine which fields you will need to choose. 3. Click Finish. 4. You will be taken to a list of all of the data retrieved from the query.
So, what has the query done for us so far Basically, you have created a subset of the data. This might be all you need to do. Typically, however, you will want to further reduce the list or to count similar records. To do this, you will need to go into the Design mode. If you will look at the top-left of the toolbar, next to the disk (save) tool, you will see the Design View tool (I have circled the tool in the picture below). Remember where this is you will use it to go back and forth from designing your query and viewing the data. When you click on the design view tool, you will see a screen that looks something like this.. More information about setting criteria. Let s say you wanted to find all students that were born in July. You would type 07* in the criteria field. The * is called a wildcard and it stands for any letter or number. Let s say I wanted to see only students that were born in July, 1992. You would type 07*92. Any birth date that began with 07 and ended in 92 would be accessed. What if I wanted to find the students who were born in either July or August.
You would type 07*92 in the first criteria line and 08*92 in the second line. Counts, Averages, etc. Let s consider the following query. I wanted to see what the average science percentage score was for boys in the 4 th grade. So, I followed the following steps: 1. Using the query wizard, I chose the grade and PCT_SS fields and clicked on the Finish button. This gave me a list of all science scores. 2. I clicked on the design view button (upper left-corner, next to the save tool). 3. Since I want to do an average, I need to click on the View menu and choose Totals. You will now see a new line called Total on the query screen. 4. When you click on the box under the field that you want to average, you will have the option to choose Avg. 5. Run the query (click on the tool on the top left beside the save tool). More notes about calculations: If you have data that is not numerical (for example, the TOT- scores are represented by letters P, NH, etc.), you can only COUNT. If you want to do more than one calculation, you can add the same field in multiple columns on the query. In my example above, you could click in the box next to PCT_SC and choose PCT_SC again. Then you could choose StDev to view the standard deviation. You could also choose PCT_MA to view the averages of both science and math. The main thing to consider when using calculations is to KEEP IT SIMPLE. You have to be careful when you choose the field to GROUP BY. For example, let s say I wanted to average the scores of the 4 th grade students that were born between July and October of 1992. Consider the query below..
Looks like it would work. But, when I ran the query, I got the following result.. DATA Query1 GRADE BDATE AvgOfPCT_SC 04 070192 62 04 070292 19.5 04 070392 18 04 070492 17 04 070692 53 04 070792 47 04 070892 14 04 071092 18 04 071292 98 04 071392 86 etc Why Think about the query. It was grouping by the birthdate. So, every unique birthdate was listed. But, this isn t really what we want. How do we just get the average of all of these records The easiest way is to create a new query that uses this query as the data. 1. Save this query (for example, call it young students) and exit the query. 2. Create a new query using the query wizard. 3. Instead of choosing the DATA table, choose the young students QUERY.
4. Think about this query. You already know the grade of these students (4) and you already selected out the birthdates. So, you only need the AvgOfPCT_SC field. When you hit the Next button, you will get a new option (because you are dealing now with a number instead of text data). 5. Choose Summary and then click on the Summary Options
6. You can click on all or only a few of the choices. Click OK and, on the next screen, click Finish. 7. Wow! You now have your summary data with calculations! Create a report based on the query If you want to print a report, you can choose to create your report (using a wizard) based on the results from a query. For example, let s say I wanted to print a list of all students that were Proficient in science. 1. I could create a query that listed the students first and last names and their grade. 2. I could save this query (maybe I would name it All Proficient Students ) 3. I could then go to the Report tab and choose to create a report using a wizard. 4. On the first screen, instead of choosing the DATA table, I would choose the All Proficient Students query. 5. I would choose all of the fields and take the defaults (you can choose to sort your results if you wish). 6. This will give you a formatted list of all of your proficient students! Copy the data in the query and paste it into Excel You can also select all of the data in the result of a query and paste the data into Excel. Then, you can create formulas or pivot tables. Let s try it. I ll create a query that lists the 4 th grade students, with their gender, ethnic, lunch status, and TOTSC score proficiency. DATA Query3 GRADE SEX ETHNIC LUNCH TOTSC 04 F W 1 NH 04 M W 3 P 04 M W 2 P 04 F W 1 AH 04 M W 3 AM 04 F W 3 P 04 F W 3 P 04 M W 3 P 04 M W 1 NH 04 M W 1 NH 04 M W 2 D etc. 1. Now, let s copy this data (Edit/Select All Records) and Paste it into Excel. Save the Excel worksheet. Creating the Pivot Table 1. Select the data in Excel. 2. Click on the Data menu and choose Pivot Table and Pivot Chart Report 3. Choose Microsoft Excel List or Database (default) and choose Pivot Table (default). Click Next.
4. Since you pre-selected the data, you can hit Next here as well. 5. Choose New Worksheet and hit Finish. 6. You will be taken to your Pivot Table worksheet. It will look like this 7. Now, think about what you want to examine. For example, suppose I want to see the TOTSC by ethnic. And, let s say I want the TOTSC scores to appear going down the first column and the ethic codes to appear across the top. 8. I would click on on TOTSC and DRAG to the place on the screen that says Drop Row Fields Here. 9. Similarly, I would click on ETHNIC and DRAG to the place where it says DROP COLUMN FIELDS HERE. 10. But, when you do this, you won t see the counts. 11. So, you have to click on the ETHNIC item again and drag it over to the place where it says DROP DATA ITEMS HERE.
My best advise on using pivot tables is to play around with them and practice. They are very powerful tools, but they can be confusing at first glance. Conclusion Try going through this tutorial when you get back to your school. Don t be afraid to try new things with your queries you may discover some very interesting trends about your students. If you have questions, feel free to contact me at 502 863-7050 (work) or 859 296-9933 (home) or through e-mail at apeach0@georgetowncollege.edu. Good luck!!! Andrea Peach Assistant Professor of Education Georgetown College