Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
bilety_inform_1 (1).doc
Скачиваний:
0
Добавлен:
03.08.2019
Размер:
449.54 Кб
Скачать

Creating Simple Forms with the Form Wizard

The Form, Split Form, and Multiple Items commands are fast ways to create a form, but they suffer from a lack of interaction. That is, you have no way of specifying the fields you want to see or the formatting style you want to use.For a bit more control over your forms you need to use the Form Wizard. The Form Wizard is more like a traditional Office wizard. It displays a series of dialog boxes that take you step by step through the entire form-creation process.

31. Bound control  gets its value from a field in the table or query and, as the data changes, the value of the bound control changes with it. The data fields you add to a form design are examples of bound controls. Unbound control

Has no tie to the underlying table data and retains the value you enter.

Examples of unbound controls are lines, rectangles,text, and images.

CREATING a FORM in DESIGN VIEW

Although the form wizard is a step from the Form, Split form, and Multiple Items commands in terms of control, the resulting forms still might not satisfy your needs. For example, you might want to build a custom form that mirrors as closely as possible an equivalent paper form. If the Access from resembles the paper form, the person using it to enter data will feel more comfortable with it and will be less likely to make mistakes.

  • For maximum form flexibility, you need to use the form design window, which gives you total control over the form, including the positioning of the controls, the formatting of the text, colours, and much more.

32. Creating a form in design view

Although the form wizard is a step from the Form, Split form, and Multiple Items commands in terms of control, the resulting forms still might not satisfy your needs. For example, you might want to build a custom form that mirrors as closely as possible an equivalent paper form. If the Access from resembles the paper form, the person using it to enter data will feel more comfortable with it and will be less likely to make mistakes.

  • For maximum form flexibility, you need to use the form design window, which gives you total control over the form, including the positioning of the controls, the formatting of the text, colours, and much more.

Any form object comes with a large number of properties that you can work with. Control properties set the structure, appearance, and behavior of the controls. Properties can also determine the characteristics of the text and data contained in a control.

To work with the form properties, follow these steps:

  • Select the form by clicking the form selector button.

  • Choose Design / Property Sheet to display the Property Sheet pane.

33. The list of properties depends on current selection.

  • The properties are grouped into tabs in the sheet by type: Format, Data, Event, Other, and All. Click the tab that will show the properties you want to change or stay with All to see the entire list. The major problem with creating a form in Design view is that you do not see data from the form’s record source until you switch back and forth to get the layout you prefer and to size it the controls properly.

CREATING a FORM INTERACTIVELY in LAYOUT VIEW

Access 2007 helps you reduce much of this design drudgery by offering a new form view called Layout. This hybrid view shows you the data from the record source but also enables you to change many aspects of the form design. To switch to this view from Design view, choose Design, click the lower half of the View split button, and then click Layout View.

The form data appears, but you also have access the Ribbon’s Format and Arrange tabs, which enable you to change the font, add certain controls, such as a logo and title, add fields, apply AutoFormat, and more.

PROTECTING the FORM and DATA from OTHER USERS

  • In business environment, it is common to build forms as front ends for other users. A properly designed form gives users easier access to the data and keeps them away from fields they do not need to see, such as primary key fields and sensitive data. As you will see, building good business forms takes a bit of extra work on your part. So if you go to all that trouble, the last thing you want is for the users to either change the form design, on purpose or inadvertently, or alter the data in some unacceptable way, such as deleting records.Access can help you protect both the form and the underlying data. The Property Sheet for a form contains a number of properties that enable you to restrict the actions that users can take with your form.

34. DESIGNING FORMS FOR EFFICIENT AND ACCURATE DATA ENTRY

Data entry is one of those tasks that can be called dangerous. It is important that the data must be entered accurately. As a forms designer you can reduce this danger by setting up your forms so that data entry is both as efficient as possible and as accurate as possible.

 Preventing errors by validating data

You must avoid “improper” data:

Data that is the wrong type. For example, entering a text string in a cell that requires a number.

Data that falls outside an allowable range. For example, entering 200 in a cell that requires a number between 1 and 100.

Helping Users with Text Prompts

You can:

Add status bar text. This is a string that appears in the Access status bar when users enter the field. You specify this text by opening the field’s property sheet, displaying the Other tab, and then entering the string in the STATUS BAR TEXT property.

Add a label. Place a label control near the field and use it to enter text that describes the field’s data requirements or shortcut keys. For example, if the field requires a date, the label might say PRESS CTRL +; TO ENTER TODAY’S DATE.

Preventing errors with Data Validation Expressions

The problem with text prompts is they require other people to both read and act on the text. The better solution for preventing data entry errors is the Access data validation feature. With data validation, you create rules that specify exactly what kind of data can be entered and in what range that data can fall. You can also specify pop-up input messages that appear when a cell is selected, as well as error messages that appear when data is entered improperly.

  • Display the property sheet of the field to which you want to apply the data validation rule.

  • Click the Data tab.

  • Click inside the Validation rule property.

  • Enter a formula that specifies the validation criteria. You can either enter the formula directly into the property box, or you can click the ellipsis (…) button and enter the formula using Expression Builder.

  • If you want a dialog box to appear when the users enter invalid data, click inside the validation Text property and then specify the message that appears.

  • Close the property sheet to apply the data validation rule.

35. DESIGNING FORMS FOR EFFICIENT AND ACCURATE DATA ENTRY

Data entry is one of those tasks that can be called dangerous. It is important that the data must be entered accurately. As a forms designer you can reduce this danger by setting up your forms so that data entry is both as efficient as possible and as accurate as possible.

 Preventing errors by validating data

You must avoid “improper” data:

Data that is the wrong type. For example, entering a text string in a cell that requires a number.

Data that falls outside an allowable range. For example, entering 200 in a cell that requires a number between 1 and 100.

Using Input Masks for Consistent and Accurate Data Entry

For example consider the following phone numbers:

(123)444-6666 (123) 444-6666 (123)4446666

123444-6666 1234446666

These sorts of inconsistences might appear trivial but they can cause all kinds of problems from other users misreading the data to improper sorting to difficulties analyzing or querying the data.

One way to avoid them is to apply an input mask to the field. It is a kind of template that shows the users how to enter the data and prevents them from entering incorrect characters.

For example: (___)___-____

Each underscore (_) acts as a placeholder for (in this case) for a digit, and the parentheses and dash appear automatically as the user enters the number.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]