The rest of this chapter shows you how to move around on and work with data in the various types of forms discussed earlier in the chapter.
Moving around on a form is similar to moving around in a datasheet, but there are a few subtle differences between forms and datasheets (usually having to do with how a form was designed) that determine how a form works with data. You can use the frmContactsPlain form in the Conrad Systems Contacts database (which is a copy of frmContacts without custom Ribbons) to explore the ways in which forms work.
First, if necessary, open the Conrad Systems Contacts database. Next, click the Navigation Pane menu, click Object Type under Navigate To Category, and then click Forms under Filter By Group. Select the frmContactsPlain form, right-click on the form name, and click the Open command on the shortcut menu to see the form shown in Figure 10–24.
Figure 10–24: You can use the frmContactsPlain form in the Conrad Systems Contacts database to explore moving around on a form.
The way you move around on a form depends in part on the form’s design. For example, the frmContactsPlain form contains three subforms embedded within the tab control- one for contact companies, another for contact events, and a third for contact products. The two boxes you see on the Contact Info tab aren’t subforms-they’re rectangle controls that we added to enhance the grouping of the main detail fields.
The fsubContactEventsPlain subform on the Events tab is a continuous form. You move around on it similarly to how you move around in a datasheet. On this subform you can use the vertical scroll bar to move the display up or down. You can toggle the subform between two different views-Form view (its current state) and Datasheet view. If you want to see the Datasheet view of the fsubContactEventsPlain subform, right-click in any of the fields on the subform (to ensure that the focus is on the subform), click Subform on the shortcut menu, and then click the Datasheet command. (Notice that the PivotTable and PivotChart options on the shortcut menu appear dimmed-we have disallowed those views in the design of this subform.) The fsubContactEvents subform will now look like Figure 10–25.
Figure 10–25: You can display the fsubContactEventsPlain subform in Datasheet view on the Events tab of frmContactsPlain.
In the frmContactsPlain form, you view different contact records by using the navigation buttons and Record Number box at the bottom of the form. To see the next contact, use the main form’s navigation buttons. To see different companies, events, or products for a particular contact, use the vertical scroll bar within the subform or the navigation buttons within the subform window. Note that you can also design a subform without its own Record Number box and navigation buttons. You might want to do this if you think the set of navigation buttons will be confusing to your users.
You can also click the Go To command in the Find group on the Home tab on the Ribbon to move to the first, last, next, or previous record in the main form or in the subform. You can select any field in the form by clicking anywhere in that field. To use the Go To command you must first move to the form or the subform containing those records you want to view.
If you’re typing new data, you might find it easier to use the keyboard rather than the mouse to move around on a form. Some of the keyboard shortcuts you can use with forms are listed in Table 10–1 (for moving around in fields and records) and in Table 10–2 (for actions in a list box or in a combo box). Note that a form that edits data can be in one of two modes: Edit mode or Navigation mode. You’re in Edit mode on a form when you can see a flashing insertion point in the current field. To enter Navigation mode, tab to the next field or press the F2 key to select the current field. As you can see in the following tables, some keyboard shortcuts work differently depending on the mode. Other keyboard shortcuts work in only one mode or the other.
Key(s) | Movement in Fields and Records |
---|---|
Tab | Moves to the next field. |
Shift+Tab | Moves to the previous field. |
Home | In Navigation mode, moves to the first field of the current record. In Edit mode, moves to the beginning of the current field. |
End | In Navigation mode, moves to the last field of the current record. In Edit mode, moves to the end of the current field. |
Ctrl+Page Up | Moves to the current field of the previous record. |
Ctrl+Page Down | Moves to the current field of the next record. |
Ctrl+Up Arrow | In Navigation mode, moves to the current field of the first record. In Edit mode, moves to the beginning of the current field. |
Ctrl+Down Arrow | In Navigation mode, moves to the current field of the last record. In Edit mode, moves to the end of the current field. |
Ctrl+Home | In Navigation mode, moves to the first field of the first record. In Edit mode, moves to the beginning of the current field. |
Ctrl+End | In Navigation mode, moves to the last field of the last record. In Edit mode, moves to the end of the current field. |
Ctrl+Tab | If in a subform, moves to the next field in the main form. If the subform is the last field in the tab sequence in the main form, moves to the first field in the next main record. If the focus is on a field on a tab, moves the focus to the first field in the tab order on the next tab. If the focus is on a subform within a tab, moves the focus to the tab. If the subform within the tab is the last control on the form, moves the focus to the tab on the next record. If the focus is on a tab (not a field within the tab), cycles forward through the tabs. |
Ctrl+Shift+Tab | If in a subform, moves to the previous field in the main form. If the subform is the first field in the tab sequence in the main form, moves to the last field in the next main record. If the focus is on a field on a tab, moves the focus to the first field in the tab order on the previous tab. If the focus is on a subform within a tab, moves the focus to the tab. If the subform within the tab is the first control on the form, moves the focus to the tab on the previous record. If the focus is on a tab (not a field within the tab), cycles backward through the tabs. |
Ctrl+Shift+Home | In Navigation mode, moves to the first field in the record. When in Navigation mode in a field on a tab, moves the focus to the tab. When the focus is on a tab (not a field within the tab), moves to the first tab on the tab control. In Edit mode, selects all characters from the current insertion point to the beginning of the field. |
Ctrl+Shift+End | In Navigation mode, moves to the last field in the record. When in Navigation mode in a field on a tab, moves the focus to the tab. When the focus is on a tab (not a field within the tab), moves to the last tab on the tab control. In Edit mode, selects all characters from the current insertion point to the end of the field. |
Alt+F5 | Moves to the Record Number box. |
Enter | Depends on your settings for the Move After Enter option in the Editing section of the Advanced category in the Access Options dialog box. |
Shift+Enter | Saves the current record. |
Key(s) | Action in a List Box or a Combo Box |
---|---|
F4 or Alt+Down Arrow | Opens or closes a combo box or a drop-down list box. |
Down Arrow | Moves down one line in a list box or in a combo box when the list is open. |
Up Arrow | Moves up one line in a list box or in a combo box when the list is open. |
Page Down | Moves down to the next group of lines. |
Page Up | Moves up to the next group of lines. |
Tab | Exits the box and moves to the next field. |