It's easy to change the location and size of a control on a form. Moving a control allows you to change the order of information appearing on the form. When you size a control, you increase or decrease the amount of information the control can display. Once you have selected a control on a form, sizing handles appear around the edges of the control. Now you can drag its sizing handles to adjust the size of the control or move the control to a new location on the form.
This lesson will give you some experience moving and sizing the controls on the form you created in the previous lesson.
Make sure that you have the frmFirstForm form open in Design View.
You need to select a control before you can move or size it.
Click the Phone text box to select it.
Sizing handles appear around the selected Phone field. Here's how to move a control:
Position the pointer on any border of the Phone text box (but not over a sizing handle) until it changes to a .
When the mouse pointer changes to a , it means that you can drag and drop the control to a location.
Note: It takes a good deal of precision to position the pointer over the tiny border of a control. Move the pointer very slowly and wait until it turns into a before you try to move the control.
Click and hold down the mouse button while the pointer is still over the border of the Phone text box. Drag the field directly to the right of the FirstName text box and directly above the SSN text box, as shown in Figure 7-7, then release the mouse button.
By simply dragging and dropping with the mouse, you can move any object on a form or reportany shapes, lines, pictures, or text boxes.
Sometimes, you may want to move the object just a smidgen. You can use the keyboard to move or nudge controls with greater precision. To move the control, simply hold down the Ctrl key as you press any of the arrow keys on the keyboard.
With the Phone field still selected, hold down the Ctrl key and press the (left arrow) key.
Follow the procedure you learned in Step 5 and move the DOB text box directly to the right of the LastName text box and directly above the Phone text box.
Don't worry if the DOB field isn't the same size or aligned with the other controlswe'll fix that in a minute.
Notice that the DOB text box moves with its label control. You can move labels and controls independently of one anther by dragging them by their upper left sizing handles.
Position the pointer over the upper left sizing handle of the DOB label until it changes to a .
When the mouse pointer changes to a , it means that you can drag and drop the text box or label independently of one another.
Note: Most controls have a corresponding label, as shown in Figure 7-8. Make sure that you position the mouse over the DOB label and not the DOB text box.
Click and hold down the mouse button while the pointer is still over the upper left sizing handle of the DOB label. Drag the DOB label so that the DOB label is left-aligned with the Phone label below it.
Enough about moving controls and labelshere's how to change their size.
When you select a control, sizing handles appear around its edge. You can use these sizing handles to change the size and proportions of the selected control. Move on to the next step to see how we can change the size of the selected DOB label.
With the DOB label still selected, position the pointer over the middle-right sizing handle until it changes to a . Click and hold down the mouse button and drag to the right until the label is the same width as the other labels on the form, then release the mouse button.
As you drag a control's sizing handle, a dotted outline appears to help you resize it.
Click the DOB text box. Follow the procedure you learned in Step 9 and resize the DOB text box so that it is the same width as the other text boxes in the form.
That's all there is to moving and sizing controls on a form.
Click the Save button on the Form Design toolbar to save your changes.