Unit 11. Forms (IV).


Working with controls

Selecting controls.

To select a control just click on it. When a control is selected it appears enclosed in some boxes, we call these boxes movement controllers (the bigger) and size controllers (the smaller) as we can see in the image below.

To select various controls we can click on one of the controls to select, maintain depressed Shift key and click on each one of the controls to select.

If we want to select various adjacent controls there is an easier way: left click on the mouse over the background of the design area and without letting go drag it, we see that a box appears in the design area, and when we release the mouse button all the controls that enter into this box will remain selected (it is not necessary for the control to be entirely in the box).

Adding controls

To add a new source field to a form, the fastest and easiest way is to open the Fields box (if not already open) by clicking on the button on the toolbar. All the source fields will appear in this box. Next click on the field you want to add and drag it to the place in the form where you want it to appear. Access will automatically create a tag with the name of the field and an associated text box.

If we want to add another type of control like an image, open the Toolbox, click on the type of control that we want to add, and let go of the mouse button, we see that the cursor has taken on a different form. We now position ourselves in the area of the form where we would like to define the control, left clic and maintaining, drag the mouse untill we have the desired size.

To move a control, we select the control and move the mouse a little until the cursor takes on the form of a hand. At this moment clic and maintain, dragging the control into its final position. When a control is moved the label is also selected and moves with the control.

To move only the label, position the cursor over its movement controller, and when the cursor takes the form of an index finger drag it.

We can move the control without its tag in much the same way, but the index finger needs to be over the movement controller of the control.

To move various controls at the same time, we select and move one of them and they will all move the same way.

Changing the size of the controls

To change the size of a control select it so that the size controllers appear, next move the mouse over one of the size controllers, and when the cursor takes the form of a double arrow, left clic, maintain, and drag untill the control has the desired size.

To change the size of various controls at the same time, we select and change the size of one of them and they will all change the same way.

 

To practice these operations you can perform the Step by step exercise Changing the design of forms.

 

To practice these operations you can perform the Step by step exercise Creating subforms.

 

To align various controls, we can move them one by one, guiding them through the box, but we have an easier method in the Format menu. We select the controls to align, drop down the Format menu, then the Align menu and select the option according to how we choose to align the controls, to the left, right, up, down, and to grid. To see the effect of every option we have a diagram to the left of the option.

 

 

 

Adjusting the size of the controls

If we want various controls to be the same size to leave our form more attractive we have a very useful tool, the Size option in the Format menu.

 

We proceed in the same way as with aligning controls, selecting the controls we want to adjust, drop down the Format menu, then the Size menu, and select the most adequate option.

We can select To Fit, this makes the control the correct size so that all of its contents will fit.

To Grid: adjusts to the grid.

To Tallest: all contols take on the tallest height.

To Shortest: all the controls take on the smallest height.

To Widest: all the controls take on the largest width.

To Narrowest: all the controls take on the narrowest width.

 

When we want to align and leave controls at the same size it is best to first adjust the size and then aline them up, as the aligning is sometimes lost when the sizes are adjusted.

 

Adjusting the space between controls

If we want to change the distance between controls, apart from moving them freely in the design area, we can use the Format menu options.

We select the controls that we want to adjust, drop down the Format menu, and in the Horizontal spacing menu we select the most adequate option, leaving it with the same space between controls (Make equal), increasing the space between the selected controls as shown in the image to the left of the option (Increase), or reduce the space (Decrease).

 

We can do the same with the vertical spacing, selecting the controls that we want to adjust, drop down the Format menu, then in the Vertical Spacing menu we select the most adequate option for us, leaving it with the same space between controls (Make equal) as shown in the image to the left, increasing the space between the selected controls (Increase), or reduce the space (Decrease).

 

 

 

To practice these operations you can perform the Step by step exercise Adjusting and aligning controls.

Unit 11 exercises.

 

  Unit 11 evaluation test.

 



 

Page. 11.4

Legal warning: Authorised on-line use only. It is not allowed the use of these courses in companies or private teaching centres.
© aulaClic. All rights reserved. Reproduction in any form whatsoever is prohibited. April-2006.