* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Wizards
Open Database Connectivity wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
Concurrency control wikipedia , lookup
Microsoft Access wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Clusterpoint wikipedia , lookup
Relational model wikipedia , lookup
Microsoft Access Lab Wizards IT 214 Database Fundamentals Wizards Objective: Learn to perform some simple tasks with wizards Modify the results of running a wizard 1. Start Access (Start | Programs | Microsoft Access). Create a Blank Database (File | New to open the Task Pane if it is not already open, click Blank Database under New on the task pane). 2. Name your database “Start” in the “File New Database” dialog box. The Database window will appear. 3. Create a new table using the table wizard: a. Click on Tables under Objects in the Database window. Then double click “Create table by using wizard”. b. Click the “Personal” option button. c. Under Sample tables, select “Plants”. d. Under Sample fields select the following individually and click “>” after each selection: PlantID, CommonName, Flowering, DatePurchased, and PlacePurchased. e. Click on the “Next” button. f. Name your table tblPlants. Let Access select a Primary Key. Click “Next”, and then click “Finish”. 4. You should now be in “Datasheet view” where you can enter data. Enter data for 4 or 5 plants. Note the column heading for “Flowering”. Also, note that “Flowering” must be Yes or No. Make some of your plants flowering and some not flowering. Close Datasheet view (Click X in upper right of the datasheet window). When asked to save changes, select “Yes”. 5. Next, ensure that tblPlants is selected and click the Design icon on the Database window toolbar. The table design window will appear. Note that PlantID has a key next to it. This indicates that this field is a primary key field. Also note that the field Indexed in the lower left of the Design window shows “Yes (No Duplicates)”. This means that access has placed a unique index on PlantID. Use help to find out what a primary key is (press F1 and search on Primary Key – look at “About primary keys”). What is an “AutoNumber primary key”? What are “Single-field primary keys” and “Muliple-field primary keys”? 6. Click field name “Flowering”. On the General tab, change the caption to “Flowering?”. Next click the Lookup tab. Change the “Display control” to a check box. Save your changes and close design view. Double click tblPlants to bring you to Datasheet View. Note the column name “Flowering” changed to “Flowering?” and that this column now contains check boxes. Also note that 1 Microsoft Access Lab Wizards IT 214 Database Fundamentals although the column name in Datasheet view has changed, the underlying field name is still “Flowering”. 7. Right click in one of the “Flowering?” cells. In the context menu, select Filter by selection. You have applied a filter that causes only rows having the same value of “Flowering” as the chosen cell to be displayed. To remove the filter, right click somewhere on the data sheet and select Remove filter/sort. 8. To sort a table by a particular column, right click anywhere in the desired column and select “Sort ascending” or “Sort descending”. Try this with the “Flowering?” column and the CommonName column. 9. Next click Forms under Objects in the Database window. Click the New icon in the Database window toolbar. Select AutoForm: Columnar in the New Form dialog box. Base your form on tblPlants. To do so, select tblPlants at the bottom of the dialog box. Click OK. A new form will be displayed. Click the Save icon on the main Access window toolbar (looks like a floppy disk) and click OK in the Save As dialog box. Try the Record navigation controls at the bottom of the form. Move beyond the last record and enter a new plant. Close the form and return to Tables. Double click tblPlants. The data you added using your form should appear in Datasheet view. 10. Click Queries under Objects on the Database form. Double click “Create query by using wizard”. Select tblPlants under Tables/Queries. Note, you can create a query from another query. What do you think the affect of basing a query on another query is? Select the fields to display when the query is executed – select CommonName, and Flowering, click Next. Keep Detail query selected and click Next. Name the query qryPlants. Select “Modify query design” and click Finish. You should now be in Query design view. In the cell at the intersection of the “Flowering?” column and the “Criteria” row, enter No. Click the Run icon1. Only flowering plants should be displayed. Close the datasheet window and click “Yes” when asked if you want to save your query. 11. Next, use Help to try and figure out how to switch the record source for the form you created above from tblPlants to qryPlants. See footnote if you can’t figure it out.2 12. Create a report on your plants. Click Reports under Objects in the Database window. Double-click “Create report using wizard”. Under Tables/Queries, ensure that “tblPlants” is selected. In the “Available Fields” area, move all fields except PlantId to the “Selected Fields” area3. 1 ! On the main window toolbar 2 Hint, open the form in design view. Then, in the upper left hand corner of the design window, doubleclick the gray square with the black square in the center of it. Click the Data tab. Change the record source on this tab. 3 Click >> then select PlantId in the Selected Fields area and click < 2 Microsoft Access Lab Wizards IT 214 Database Fundamentals 13. Click Next. When asked for grouping levels, select “Flowering” and click “>”. A diagram showing the report layout will appear on the right. Click Next. When asked for sorting criteria, select CommonName Ascending4. 14. When asked for Layout and Orientation, select one that you like5. Click next and pick a style that you like. Click Next and when asked to name your report, call it rptPlants. Leave “Preview the report” selected and click Finish. Your report should appear. Close the report view. Note that rptPlants shows under the Report object in the Database window. You can double click rptPlants to see your report again. Close the report. Add some more data to the Plants table. Rerun your report. The newly added data should appear. Note, you can print your report by going to File | Print when the report is displayed. 15. Exit Access (File | Exit). Select CommonName in the Combo box and ensure the is showing on the Ascending/Descending toggle button. Access will allow you to sort by three more criteria. 4 5 A diagram of the report appearance will show on the left. 3