Saturday, November 17, 2012

MS Access Lesson 6


Lesson 6: Creating Forms

Access forms are much like paper forms: you can use them to enter, edit, or display data. They are based on tables. When using a form, you can choose the format, the arrangement, and which fields you want to display. This lesson teaches you how to create forms.

Using the Form Button

Access can automatically create several types of forms. For example, when you click the Form button on the Create tab, Access places all fields in the selected table on a form. If the table has a one-to-many relationship with one other table or query, Access creates a stacked form (the records are displayed in a column) for the primary table and a datasheet for the related table. If there are several tables with a one-to-many relationship, Access does not create the datasheet.

To create a form:

Create a Form
  1. Open the Navigation pane.
  2. Click the table or query on which you want to base your form.
  3. Activate the Create tab.
  4. Click Form in the Forms group. Access creates a form.
Form
You can use the Navigation bars to move through the records on a form.
Navigation Pane
1Go to First Record
2Go to Previous Record
3The Current Record
4Go to Next Record
5Go to Last Record
6Create a New (Blank) Record
 Tip Tip: After you create a form, you can save it. You can open a saved form at any time.
  1. Click the Save button on the Quick Access toolbar. Access saves the form unless you are saving for the first time. If you are saving for the first time, the Save As dialog box appears.
  2. Type the name you want to give the form.
  3. Click OK. Access saves the form. You can now access the form by using the Navigation pane.
You can also save by right-clicking a form’s tab and then selecting Save from the menu that appears. Access saves the form unless you are saving for the first time. If you are saving for the first time, the Save As dialog box appears. Type the name you want to give the form and then click OK. Access saves the form. You can now access the form by using the Navigation pane.

Create a Split Form

A split form is a form in which the same data is displayed in two views simultaneously. One part of the form displays in Form view (stacked fields), while the other part displays in Datasheet view. The two views are synchronized, so as you select a field in one view, it is automatically selected in the other view. You can add, change, or delete the data in either view. Using a split form gives you the benefits of two types of forms in a single form. For example, you can use the datasheet portion to locate records and the form portion to edit records.

To create a split form:

Split Form
  1. Open the Navigation pane.
  2. Click the table or query on which you want to base your form.
  3. Activate the Create tab.
  4. Click Split Form in the Forms group. Access creates a split form.
Split Form Example

Create a Multiple Items Form

You can use the Multiple Items button on the Forms tab to create a form that displays multiple records, one record per row.

To create a multiple items form:

Multiple Items Form
  1. Open the Navigation pane.
  2. Click the table or query on which you want to base your form.
  3. Activate the Create tab.
  4. Click Multiple Items in the Forms group. Access creates a multiple items form.
Multiple Items Forms
 Tip Tip: A view is a way of looking at an Access object. Forms have three views: Form view, Layout view, and Design view. You can enter, edit, and view data in Form view. You can modify a form in Layout view or Design view. In Layout view, you can see your data, and the form you see closely resembles what your form will look like when you view it in Form view. You can make most, but not all, changes to your form in Layout view. Design view displays the structure of your form. In this view you cannot see the underlying data, but you can perform some tasks in Design view that you cannot perform in Layout view. This tutorial focuses on Layout view.

To change the view:

  1. Open the form.
  2. Activate the Format tab.
  3. Click the down-arrow under the View button. A menu appears.
  4. Click the view you want.

Modify a Form

After you create a form, it opens in Layout view, where you can modify it.

To change the size of a field:

  1. Click a side of the field and drag to change the width of the field.
  2. Click the top or bottom of a field and drag to change the height of a field.

To move a datasheet:

  1. Click the datasheet to select it.
  2. Click and drag the four-sided arrow in the upper-right corner to move the datasheet.

To resize a datasheet:

  1. Click the datasheet to select it.
  2. Click a side of the datasheet and drag to change the width.
  3. Click the top or bottom of the datasheet and drag to change the height.

To apply an AutoFormat:

The AutoFormat option on the Format tab enables you to apply formats quickly, such as background colors, field colors, field label colors, and fonts.
  1. Activate the Format tab.
  2. Click AutoFormat. The AutoFormat menu appears.
  3. Click the format you want to apply.

To change a form title:

When you create a form, by default, Access uses the form name as the title. You can change the title.
  1. Activate the Format tab.
  2. Click the Title button.
  3. Type the new title.

To add the date and time:

You can easily add the date and time to your form.
  1. Activate the Format tab.
  2. Click the Date and Time button. The Date and Time dialog box appears. Select the date and time format you want. The date and time appear on your form.
Change Fonts and Formats
You can use options on the Format tab to manually apply individual formats to your report. However, before you can apply a format to a field or field label, you must select it. To select a field or field label, click it. To select multiple items, hold down the Shift key and then click each item you want to select. A box surrounds selected items.
Change Fonts and Formats
ButtonShortcut KeyFunction
Layout View—Format Tab, Font Group
Font ButtonApply a font to the current selection.
Font Size ButtonSet the size of the font for the current selection.
Bold ButtonCtrl-bBold the current selection.
Italic ButtonCtrl-iItalicize the current selection.
Underline ButtonCtrl-uUnderline the current selection.
Left Align ButtonCtrl-lLeft-align the selection.
Right-align ButtonCtrl-rRight-align the selection.
Center ButtonCtrl-eCenter the selection.
Font Color ButtonChange the font color.
Background Color ButtonChange the background color.
Alternating Color ButtonChange the alternating color. For example, you can have every other row on a datasheet appear in an alternating color.
Layout View—Format Tab, Formatting Group
Number Format Number Apply a Number format.
Currency ButtonUse a currency symbol.
Percent ButtonChange to percent.
Thousands SeparatorUse thousand separators.
Increase DecimalIncrease decimal places.
Decrease DecimalDecrease decimal places.
Layout View—Format Tab, Gridlines Group
Add Gridlines ButtonAdd gridlines.
Change Weight Button Change the weight of gridlines.
Change Style ButtonChange the style of gridlines.
Gridline Color ButtonChange the color of gridlines.
Layout View—Format Tab, Controls Group
Insert Logo ButtonAdd a logo.
Change Title ButtonAdd or change a title.
Date and Time ButtonAdd a date and time.
Change Weight Button Set line thickness.
Change Style ButtonSet line style.
Gridline Color ButtonSet line color.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...