Sunteți pe pagina 1din 5

Creating Queries and Reports in Access

1. Open the Database Birthday Gifts that you created. 2. If your database opens with the Security Warning, Click on Options, then click Enable this content, finally click on OK. 3. When you open your database, all objects will be closed. You will want to open your Gift List table and make sure all your changes were made during the last class. 4. You are going to create a query using this table: Click on the Create tab, find the Other group, and click on the Query Wizard.

If you made changes to your table, you may get this error:

If you get the error, click yes. 5. You will get the New Query dialog box. The dialog box comes up with the Simple Query Wizard already selected, this is what you want to use but feel free to click on the others to see what they do. When you get done exploring your other options, make sure that Simple Query Wizard is selected and click OK.

6. This is the dialog box you will get:

7. Under some circumstances, there would be more than one table to choose from. In this case, there is only one table so you this is the one you will use. There are four arrow buttons you can use to select the fields you want in your query: Moves one available field at a time to the selected fields box Moves all available fields at once to the selected fields box Moves one selected field at a time to the available fields box Moves all selected fields at once to the available fields box 8. Click the double arrow pointing left to select all fields. Click Next 9. In the next window, use the Detail selected. Click Next

10. Name your query Friends Gifts and open your query Modify the query design.

Click Finish.

11. The query will come up in Design View. Hover your mouse over the ID field (column) until it turns into the arrow you see below.

Right click and delete the field from your query by clicking on the field and then going to the Query Setup Group and selecting Delete Columns button. 12. You will want to type =Yes in the Criteria row (under the green check in the Friend? Column).

13. Click on the Run Button The query will come up without any of your Foes.

14. Now you want to create a list of your friends you need to buy gifts for. Click on the Create tab, look in the Reports group and select Report Wizard. 15. You will probably get this error:

Click Yes. 16. The Report Wizard dialog box will open. Move all fiends over to the selected field except Relation, Friend? and Age. Click Next.

17. On the next screen, click on Persons Name so that it becomes a heading in the field. Your preview will look like this:

Click Next. 18. On the next screen, you can sort your information if you want to. You will not need to.

Click Next. 19. For the layout, click in the circle next to outline (after you see what the others will do). You can decide if you want to have your report in Portrait or Landscape.

Click Next.

20. This is where you can select you style. These are in alphabetical order, scroll down, looking at the different styles available, and select anything BUT Solstice.

Click Next. 21. Name your report Gift Ideas and click on finish (we dont want to modify the reports design.)

22. You now have 3 objects in your navigation pane and a report that you can print out so you can remember what you want to buy your friends for their birthdays.

23. Remember to save your report before you close. Submit your database.

Standard: G.8 Query records. G.9 Create reports.

Objective: By the end of the period TSWBAT create a query and a report from their database

S-ar putea să vă placă și