Docsity

Decision Making Using Access - Lecture Notes | IS 215, Study notes of Information Technology

Toggle sidebar
bg1
T8-2 Plug-In T8 Decision Making Using Access
*
PLUG-IN
T8 Decision Making
Using Access
1. Describe the steps for creating a form using the Form Wizard using Access.
2. Describe the steps for creating and saving AutoForms using Access.
3. Describe the steps to modify the properties of a form using Access.
4. Describe the steps for creating a report using the Report Wizard using Access.
5. Describe the steps to modify the properties of a report using Access.
Introduction
This plug-in focuses on the two functions of decision making using Access: creating
forms and creating reports. A form is nothing more than a graphical representation
of a table. You can add, update, and delete records in your table by using a form. Al-
though a form can be named different from a table, they both still manipulate the
same information and the same data. Hence, if you change a record in a form, it will
be changed in the table as well.
A form is useful when you have numerous fields in a table. This way you can see
all the fields in one screen, whereas if you were in the table view (datasheet) you
would have to keep scrolling to get the field you desire.
A report is an effective way to present your data in a printed format. Because you
have control over the size and appearance of everything on a report, you can dis-
play the information the way you want to see it.
Forms
An Access form is a window, similar to a dialog box, that contains a set of controls
(such as labels, text boxes, and check boxes) to view, enter, or edit database infor-
mation, typically one record at a time.
In a form, data are obtained directly from one or more tables or data that have
been extracted using a query. Although it is possible to directly enter and edit the
information in tables in Datasheet view, a database usually includes a set of forms,
which can make entering and editing data considerably easier and can limit the
fields that can be viewed or modified.
LEARNING OUTCOMES
haa23684_PlugInT8.qxd 9/7/06 11:57 AM Page 2
CONFIRMING PAGES
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Decision Making Using Access - Lecture Notes | IS 215 and more Study notes Information Technology in PDF only on Docsity!

T8-2 * Plug-In T8 Decision Making Using Access

P L U G - I N

T

Decision Making

Using Access

1. Describe the steps for creating a form using the Form Wizard using Access.

2. Describe the steps for creating and saving AutoForms using Access.

3. Describe the steps to modify the properties of a form using Access.

4. Describe the steps for creating a report using the Report Wizard using Access.

5. Describe the steps to modify the properties of a report using Access.

Introduction This plug-in focuses on the two functions of decision making using Access: creating forms and creating reports. A form is nothing more than a graphical representation of a table. You can add, update, and delete records in your table by using a form. Al- though a form can be named different from a table, they both still manipulate the same information and the same data. Hence, if you change a record in a form, it will be changed in the table as well. A form is useful when you have numerous fields in a table. This way you can see all the fields in one screen, whereas if you were in the table view (datasheet) you would have to keep scrolling to get the field you desire. A report is an effective way to present your data in a printed format. Because you have control over the size and appearance of everything on a report, you can dis- play the information the way you want to see it.

Forms An Access form is a window, similar to a dialog box, that contains a set of controls (such as labels, text boxes, and check boxes) to view, enter, or edit database infor- mation, typically one record at a time. In a form, data are obtained directly from one or more tables or data that have been extracted using a query. Although it is possible to directly enter and edit the information in tables in Datasheet view, a database usually includes a set of forms, which can make entering and editing data considerably easier and can limit the fields that can be viewed or modified.

LEARNING OUTCOMES

CREATING A FORM USING THE

FORM WIZARD

Forms allow you to enter data one record at a time. Often, it is easier to enter data in a well-designed form rather than in a wide datasheet. You can create a form that has fields from more than one table or query. Like other wizards, the Form Wizard walks you step-by-step through the process of creating a form. To create a form using the Form Wizard:

1. Open the file T8_SlopesideBikes_Data.mbd

from the data file that accompanies this text.

2. Double-click Create form by using wizard.

3. Click the Tables/Queries drop-down arrow and select Table: BIKE.

4. Add all BIKE fields by clicking on the double right arrow. Click Next to go to the

next step.

5. Select the Columnar form layout. Click Next.

6. Select the Standard graphic style. Click Next.

7. Type in BIKE Title for a form title.

8. Click Finish to open the form and begin entering data (see Figure T8.1).

Accessing Several Tables or Queries in a Form

When you select the fields for your form in the first Form Wizard dialog box, you can add fields from several tables or queries. To add fields from each table or query, select it in the Tables/Queries drop-down list and then use the buttons to move the fields you want to the Selected Fields list. If you add fields from several forms or queries, the wizard will display one or two additional dialog boxes that weren’t shown in the previous section: one dialog box in which you specify the form or query by which you want to view your data (for ex- ample, if you selected fields from the CUSTOMER and the BIKE tables, you would choose to view your data either “by Customer” or “by Bike”) and possibly another dialog box in which you select a layout for a subform. The choices you make deter- mine the form’s record source. If your form includes fields from two tables that are related in a one-to-many relation- ship and if you selected to view your data by the primary table, the wizard will let you display the records from the related table in a subform contained within the form. As an alternative, the wizard will let you set up a linked form, which is a separate form that dis- plays the related data and which you open by clicking a button on the main form. On the other hand, if you chose to view your data by the related table in the one- to-many relationship, when the form displays a record in the related table, it will simply display the unique matching fields from the primary table along with the fields from the current record in the related table. A form that accesses data from several tables or queries can be complex to de- sign from scratch or to modify. However, if you create the form using the Form Wiz- ard, almost everything is set up for you.

CREATING AND SAVING AUTOFORMS

The AutoForm Wizard is the quickest and easiest way to create a form. There are five types of AutoForms: (1) Columnar, (2) Tabular, (3) Datasheet, (4) PivotTable, and (5) PivotChart. The Columnar Form is the default format.

Plug-In T8 Decision Making Using Access * T8-

FIGURE T8. Create a Form by Using Wizard

6. When you have made the changes you want, close the Properties dialog box by

clicking the Close box in the upper-right corner.

7. Click on the View button to switch to Form View to see the changes you have

made (refer to Figure T8.3).

MODIFYING SPECIFIC CONTROLS ON A FORM

Not all controls on your form may be of equal importance. You may want to modify the look of a specific control to make it stand out, or you may want to modify the control behavior. When designing forms, be careful not to over-design. Too many different colors, styles, or behaviors can distract from accurate data entry. To modify the properties of a specific control (refer to Figure T8.3):

1. Open BIKE form in Design view.

2. Since the BIKE form you created using the wizard did not include a title for the

form, you should create one.

3. Select all the objects on the form by pressing CTRL + A. Use your down arrow

key to move the selected objects down enough for you to enter a form title label.

4. Using the Toolbar options , select the Label tool. Notice that the pointer

changes to a plus (+) sign.

5. Click and drag a rectangular box at the top of the form. Type SLOPESIDE BIKE

FORM inside the label box.

6. Select Properties from the shortcut menu.

7. Click the Format tab if necessary.

8. Click the Font Weight property, and select Bold in the drop-down list.

9. Click the Text Align property, and select Center in the drop-down list. Note:

Some properties have a drop-down list with specific choices. For other proper- ties, you enter a specific value.

10. Close the Properties dialog box by clicking the Close box in the upper-right corner.

Plug-In T8 Decision Making Using Access * T8-

FIGURE T8. Modify Form Properties and Controls

View button Auto Format button Properties button

Select control

Control properties

11. Switch to Form View to see the changes you have made.

12. Close and Save the form.

Note: Common properties to modify are the use of scroll bars and growing or shrink- ing the size of the control based on data the user enters. If you turn off scroll bars, users can only see the data that fits within the specific control dimensions. If you turn on Can Grow or Can Shrink , the control area will grow and/or shrink to fit the data. Many formatting options are available from the shortcut menu (selecting a con- trol, then right mouse click). You can change the background color, font color, and which special effect is applied to the control.

ALIGNING CONTROLS IN A FORM

To give your form a professional look, make sure that controls are aligned evenly. You can use the form rulers or display the form grid to give you visual guidelines. Rather than trying to manually align controls, use the Access alignment tools. You can select multiple controls and then align them by the left side, right side, top, or bottom. To align controls in a form:

1. Open the CUSTOMER form.

2. Show the form grid by selecting Grid from the View menu.

3. Show the rules by selecting Ruler from the View menu.

4. Select all the label controls to the left of the text boxes.

5. Select Align from the Format menu. Select the Right alignment (refer to Figure

T8.4).

6. Switch to Form View to see the changes you have made.

7. Close and Save the form.

Note: Use left or right alignment for controls that are in the same column. Use top or bottom alignment for controls that are in the same row.

T8-6 * Plug-In T8 Decision Making Using Access

FIGURE T8.

Modify Form Properties

Select controls

4. Select the State column heading and the State control (to select both, hold down

the Shift key when selecting) and move to the right a few spaces using the right arrow key. Do not worry if some of the controls overlap.

5. Switch back to Preview mode to see the effects of your changes. Figure T8.6 dis-

plays the modified report.

T8-8 * Plug-In T8 Decision Making Using Access

FIGURE T8.

View Report

FIGURE T8.

Modified Report Properties

Note: Change the graphic style of the report by clicking the AutoFormat toolbar button. The AutoFormat style list is the same list of styles that you choose from when creating a report using the Report Wizard.

CHANGING MARGINS AND PAGE ORIENTATION FOR REPORTS

The default page orientation for a report is portrait. This means the height of the page is greater than the width. You may want to change this orientation to accom- modate multiple columns of data so they fit on one page. Margins are the blank spaces at the top, bottom, left, and right of a report. By adjusting the page margins, you can control the number of records printed on each page. Use the dialog box to adjust margins and page orientation for your reports. Here is a description on how to change the margins for a report:

1. Double-click the report name in the Reports window.

2. Click the Setup toolbar button.

3. The Page Setup dialog box opens with the Margins tab on top.

4. Change the values for the top, bottom, left, or right margin.

5. Click OK.

To change the page orientation for a report:

1. Double-click the report name in the Reports window.

2. In the Page Setup dialog box, click the Page tab.

3. Click the radio button for Portrait or Landscape orientation.

4. Click OK.

Note: When you print a report, Access prints the data along with all graphic ele- ments associated with the report’s AutoFormat. To print only the data and not the graphic elements of a report, select the Print Data Only check box on the Margins tab of the Page Setup dialog box.

Plug-In T8 Decision Making Using Access * T8-

to say Books By Publisher. Align the columns evenly and use a profession- al looking font style and layout. Save the report as Publishers.

3. TechIT Seminars

TechIT Seminars is an organization of inde- pendent seminar facilitators who provide onsite technical training to large businesses around the world. The facilitators build cur- riculum that is marketed by TechIT. TechIT books the seminars, arranges facilities, en- rolls participants, and collects the money. While the facilitators are not employees of TechIT, they provide the service that is mar- keted, and their skills and schedules need to be available to all TechIT offices. Deborah Wallbridge has been charged with tracking facilitators and their classification. She has asked you to help develop a form and a few reports to assist in scheduling seminars.

1. Use the

T8_TechITSeminars_Data.mdb file.

2. Create a data entry form for the FACIL-

ITATOR table. Set the form background color to a blue color (hue). Organize and align all controls for effective use and full data display. For the phone data, use the Phone input mask. Save the form as Facilitators Form.

3. Use the ENROLLMENT table to create

a report listing the students currently enrolled in each seminar. The report field order is Seminar ID, Last Name, First Name, Phone Number, and Student Number. Adjust all controls to display all of their contents. Adjust the color and content of the column headings as shown in Figure T8.7. Align all controls. Add a gray line above and below the column headings. Use Sorting and Grouping to sort by Seminar ID, Last Name, and First Name. Place the report date, time, and Page XX of XX in the Page Foot- er. Format the date and time to long format. Save the report as Students By Seminar Report.

4. Scale Classic Cars

Johnny Krol, introduced in Plug-In T7, runs a body shop that specializes in restoring classic cars. Johnny owns three classics and began collecting scale models when his wife put her foot down and said no to building more garage space for his cars. Johnny has decided that he needs a form and a few reports created to help in identifying the buying habits of his customers. Johnny has provided you with an updated database file, T8_ClassicCars_Data.mdb. Specifically, Johnny wants you to:

1. Create a form that will allow Johnny to enter new classic cars and update existing records.

The form should use a Columnar format and the Sandstone style. Save the form as Catalog.

2. Create a report listing classic cars grouped by their make. The report should display all

fields from the CATALOG table, sort by model name, and calculate the average price for each make. Use the Formal style. Save the report as Cars By Model.

Plug-In T8 Decision Making Using Access * T8-

FIGURE T8. Students by Seminar Report