Spacing the Windows Controls
When moving and aligning the controls on a form or report, one of the concerns you may have is that the vertical distance among the controls from one range to the next or from one range to the previous range is not logically sound.
Of course, you can move the controls to adjust this. Microsoft Access provides a set of tools you can use to create a better spacing between the ranges of controls. You can first select the controls that have been vertically aligned already. Then, on the Ribbon, click Arrange. In the Sizing & Ordering section, click Size/Space and use the options in the Spacing section
Equally Spacing the Ranges of Controls Vertically
To apply the same distance between the most top control or range of controls and the most bottom control or range of controls, on the Ribbon, click Size/Space and click Equal Vertical. In this case, Microsoft would count the number of controls or ranges of controls between them, divide the distance by the number, and apply the result as the vertical distance among the horizontally aligned controls.
Practical Learning: Equally Spacing the Ranges of Controls
Increasing Vertical Spacing of Ranges of Controls
To get the highest distance between two horizontal ranges, on the Ribbon, click Size/Space and click Increase Vertical. In this case, Microsoft Access would get the lowest distance between two horizontal ranges. Microsoft Access would then calculate the average of these measures. Then, each set of the horizontal range of controls would be moved down by that value
Decreasing Vertical Spacing of Ranges of Controls
In the Sizing & Ordering section of the Ribbon, if you click Size/Space and click Decrease Vertical, Microsoft Access would get the highest distance between two horizontal ranges. It would also get the lowest distance between two horizontal ranges. Microsoft Access would then calculate the average of these measures. Each set of the horizontal range of controls would be moved up by that value
Practical Learning: Decreasing Vertical Spacing of Controls
Spacing a Stack of Controls Horizontally
Microsoft Access provides another set of tools you can use to create a better spacing among the controls of the same range. To start, you can select the controls. After selecting the controls, on the Ribbon, click Arrange. In the Size & Ordering section, click Size/Space and use the Horizontal options in the Spacing section: Equal Horizontal: The controls would be moved to be adjacent to each other
Imagine the controls were not positioned on top of each other, for example, suppose you want to position the controls of our bottom range. Once again, first select them. Then click the Equal horizontal button. In this case, Microsoft Access would get the various distances among the controls, and the distance between the middle control and the right one. Then, Microsoft Access would calculate the average of these measures, and would apply it as the new distance among the controls.
If you want to apply a better spacing among the controls of the same range. First select the controls of the same range. On the Ribbon, click Arrange. In the Sizing & Ordering section, click Size/Space. The options you can use are: Increase Horizontal and Decrease Horizontal.
Stacking or Juxtaposing the Controls
Stacking Controls Vertically
One of the ways you can align the controls is to stack them; that is, to position controls above each other. Besides the manual techniques we saw already, to stack a group of controls, first select them. Then, on the Ribbon, click Arrange. In the Table section, click Stacked .
Practical Learning: Stacking Some Controls
Managing Stacked Controls
Selecting and Managing Controls
Before taking any action on a group of stacked controls, you must first select them. You have three options:
Practical Learning: Moving Stacked Controls
Managing the Layout of Stacked Controls
There are many actions you can take on the controls that belong to a stacked or tabular group of control. As you may know already, the controls are considered as a group. To separate them and treat each individually, select the group. In the Table section of the Arrange tab of the Ribbon, click the Remove Layout button .
To delete all controls from the group, after accessing the group:
Practical Learning: Removing a Stack
Adding a Stacked Column
Normally, when you select some controls and click the Stacked button, Microsoft Access uses the number of vertical ranges to decide how many columns to create. If those are not enough, you can add new empty columns. To do this, select the group. On the Ribbon, click Arrange. In the Rows & Columns section:
Adding a Row
When you create a group of controls using the Tabular option, Microsoft Access uses the number of columns to decide how many rows to create. If you want, you can add new empty rows. To do this, select the group. On the Ribbon, click Arrange. In the Rows & Columns section:
Designing a Group of Controls
Creating a Group of Controls
If you have a group of controls to design and that you will use over and over again, you can include them in a formal group so that, even if you click an unoccupied area of the form or report, the group would have been saved and you can get it back when needed. To create and save a group of controls, first select the controls. Then, on the Ribbon, click Arrange. In the Sizing & Ordering section, click the Size/Space button and click Group :
Remember that controls you want to select do not have to be adjacent. If you click an unoccupied area of the form or report, the selection would disappear but the group would have been saved. If you click any control of the group, the controls that belong to the group would be selected again to indicate that the selected controls are part of a group.
Dismissing a Group of Controls
When you don't need a group anymore, to dismiss it, on the Ribbon, click Arrange. In the Sizing & Ordering section, click the Size/Space button and click Ungroup .
Copying a Control
If you had applied some design on a control and you want to replicate that design, you can copy the control. This is mostly a simple operation of copy n' paste. You can copy a control on a form (or report) and paste it on the same form (or report) or you can paste it in another form (or report). When you copy and paste a control, there are some characteristics it would retain and some others it would loose. Normally, it would keep its aesthetic characteristics and its size but it will loose some others (such as its location and its programmatic characteristics such as its name.
To copy a control, first select it and then press Ctrl + C. You can also right-click a control and click Copy. To copy a group of controls, select them and press Ctrl + C. You can also select the controls, right-click one of the selected controls, and click Copy.
To paste a copied control or a copied group of controls from the clipboard, click the destination and press Ctrl + V. You can also right-click the destination and click Paste.
Deleting a Control
To delete a control from a form or a report, click it and press Delete. To delete a group of controls, select them and press Delete.
Tab Ordering the Controls
When performing data entry on a form, the user can press Tab to move from one control to another. If there is no control on the right side, the caret should move to the control under the one previously used. If the caret or focus is in the last bottom control on the form and the user press Tab, the caret should move to the next record, unless the form is configured to display only one record. This follows the arranged sequence of the controls on the form. For this reason, the controls on a form should be aligned in the order of a logical sequence.
When you add a control to a form that already has other controls, it is sequentially positioned at the end of the existing controls. The sequence of controls navigation is set using the Tab Order dialog box. The Tab Order dialog box is available when the form is opened in Design View. To display it, while the form is in Design View:
This would open the Tab Order dialog box:
The simplest and quickest way to rearrange the order of items is to click the Auto Order button. Sometimes, you will not like the arrangement made by the Tab Order dialog box. To rearrange items manually, you can move a row or a group of rows.
Practical Learning: Sequentially Ordering Controls
Accessories for Record Display on a Form
The Scroll Bars of a Form
As mentioned in Lesson 5, when designing a form, you can specify its width. When the form displays in Form View, if the user shrinks or narrows it so much that the current width is not enough to display the controls, the form would be equipped with one or more scroll bars:
To let you control the display of scroll bars, the Property Sheet is equipped with the Scroll Bars property.
The available values are:
The Navigation Buttons
The lower left section of a form displays the same navigation buttons as the table: the First Record button , the Previous Record button , the Current Record text box , the Next Record button , the Last Record button , and the New (Blank) Record button
Unlike the table, the form does not require the navigation buttons. To let you display or hide the navigation buttons, the Property Sheet of the form is equipped with the Navigation Buttons property.
The Navigation Caption
The left side of the status bar of a form displays the Record: label. This is controlled by the Navigation Caption property. Here is an example:
The Record Selectors
A form is equipped with a special area, called the Record Selector, that allows you to select a record. The Record Selector is on the left side immediate to the left section of a record on the form. Its size depends on the type of record. For a regular form (Single Form), the record selector is the long vertical box on the left of all records:
If you do not want a form to display the record selector(s), in its Design View, set its Record Selectors property to No.
Practical Learning: Hiding the Record Selector
|Previous||Copyright © 2007-2021, FunctionX, Inc.||Next|