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

The easiest way to create an input mask is to use the Input Mask Wizard.

  1. Display the property sheet of the field to which you want to apply the input data.

  2. Click the data tab.

  3. Click inside the Input Mask property.

  4. Click the ellipsis (…) button to start the Input Mask Wizard.

  5. In the Input Mask List, click the input mask you want.

  6. Use the Input Mask box to make changes to the mask.

  7. Click the option that matches how you want the field data stored in the table

    1. With the Symbols in the Mask – click this option if you want the extra symbols stored along with the data.

    2. Without the Symbols in the Mask – click this option to store only the data.

  8. Click Finish.

36. 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 Option Buttons to Present a Limited Number of Choices

Option buttons are a good choice if the underlying field accepts only a limited number of possible numbers: at least two but no more than five or six. (if you have more, use a list box or combo box).How does having multiple option buttons on a form enable you to store a single value in a field? There are two components to consider:

The options buttons – you assign each option button a value from among the list of possible values that the field can take.The option group – this is a separate control that you use to organize the option buttons. That is, if you insert multiple option buttons inside a group, Access allows the users to activate only one of the buttons at a time.

40. Macro

is a list of one or more actions that work together to carry out a particular task in response to an event. Each action carries out one particular operation. You can create the list of actions in the order in which you want them to execute. In addition to selecting the action to be taken, you can specify other details of the action called arguments, which provide additional information, such as which form to open or how to filter the records to be displayed. You can specify customized responses to user actions, such as clicking a button, opening a form, or selecting an option in an option group. Macros are easier, because you select the actions and their arguments from predefined lists, which helps prevent any errors in construction.

Macros can be either embedded in the form or report or available as separate Access objects in the Navigation pane. macro is a list of one or more actions that work together to carry out a particular task in response to an event.

Macros can also respond to system conditions.

Also, frequently performed actions can be automated using macros.

Creating a macro as a response to an event is an alternative to using a control wizard.

Writing event procedures in Visual Basic is another alternative, but it requires some skill in programming with precisely constructed commands written in established syntax.

You can set

conditions under which the macro action is to be performed, such as to display a message box if a field contains a certain value or is blank.

The macro runs only if the condition evaluates to TRUE. If the condition is FALSE, the action is skipped. Then, if another action is in the macro, it is executed. If not, the macro stops.

Types There can be embedded and standalone macros:

you can embed the macro directly in the event property or it can be an individual object.

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