MS Access

Modifying a Form

After you create a form, you may decide to modify it to add additional features or make it easier to use. For example, you might want to add or delete a field or change the location of a field on the form.

A form in Design view.

You modify a form in Design view, which you can get to in two different ways:

  • From the database window: Click the Forms icon to list the forms in the database. Click on the form you want to modify and click the Design button.

  • From a form window: Click the View button on the toolbar or select View » Design View from the menu.

This lesson will introduce you to form Design view.

  1. From the Database window, click the Forms icon in the Objects bar if it isn't already selected, then select the frmCustomers form and click the Design button.

    The frmCustomers form appears in Design view, as shown in Figure.

Don't let Design view scare you. It looks more complicated than it really is. In some ways, form Design view is similar to many Paint programs. Think of the form as your canvas and the Toolbox and Field List as the paintbrushes you use to add fields, text boxes, and buttons to the form.

Any graphic object that appears on forms and reports is called a control. A text box used to enter and display information, a text label, and a button you click to print a report would all be examples of controls. You add controls to a form by clicking the control you want to use and then by clicking and dragging it on the form to draw the control. Table shows and describes Toolbox buttons and controls.

Toolbox Buttons and Controls

Toolbox Button Description

Click this button and then click the control you want to select. To select multiple controls, click this button and hold down the Shift key as you click each control, or drag a rectangle around all controls you want to select.

Click to use Control Wizards when you add controls to your form.

Creates a static text label that is the same for every record, such as a heading. Most controls already have a text label attached.

Creates a text box that displays information from a table and query. You can also use text boxes to enter text.

Creates a box around a group of option buttons so that the user is only allowed to make one selection from the group box.

Creates a toggle button that allows you to display and enter data from a Yes/No field.

Creates an option button (or radio button) that allows the user to make a single selection from two or more choices. Option Buttons are normally used with a Group Box control.

Creates a box that is checked or unchecked. Use to enter data from a Yes/No field.

Creates a drop-down box that lets the user enter text or select an item from a list of options.

Creates a box that lets the user select an item from a list of options.

Creates a button that runs a macro or Visual Basic function.

Displays a picture or graphic file that you specify.

Inserts an OLE object that is not bound to a field in the current database. Use an Unbound Object Frame to display information from an external source or program, such as a spreadsheet, graphic, or other file.

Inserts an OLE object that is bound to a field in the database. Use Bound Object Frames to display pictures or other OLE information in the database. Normally used with OLE Object fields.

Inserts a page break.

Enables you to create tabs (like the ones found in some dialog boxes) to include more than one page of controls on the form.

Inserts another form within the main form. Use when you want to show data from a one-to-many relationship.

Enables you to draw a line.

Enables you to draw a rectangle.

Click to display other OLE objects.


To modify a form:

  1. from the database window, click the forms icon in the objects bar.

  2. click the form you want to modify and click the design button.

    or...

    open the form and click the view button on the toolbar.

by BrainBellupdated
Advertisement: