Using the Grid

3 4

When you open a form, report, or data access page in Design view, you’ll notice lines and grid points covering the object’s background. This is the grid, and you’ll use these lines and grid points to position controls by aligning controls with a specific point or line.

Adjusting the Grid Points

The grid displays 24 grid points per inch by default. To adjust the distance between the grid points, change the form’s Grid X and Grid Y properties. Reduce the distance between grid points by assigning a value higher than the current property value; increase the distance by entering a lower value. To alter the distance between grid points, follow these steps:

  1. Open a form in Design view by clicking Forms on the Database window’s Objects bar and then double-clicking Create Form In Design View.
  2. Open the properties sheet, if necessary, by clicking the Properties button on the Form Design toolbar.
  3. Locate the Grid X property on the Format page in the properties sheet, and then enter a lower value for the current setting. For example, if the setting is 24, enter 12.
  4. Locate the Grid Y property, and enter the same value you entered for the Grid X property.

    Access will update the grid by increasing the space between each grid point. If you replaced a setting of 24 with 12, you’ll see that space double, as shown in Figure 8-3. Originally, there were 24 grid points per inch; now there are only 12.

    figure 8-3.in this figure, grid properties are set to the value 12.

    Figure 8-3. In this figure, grid properties are set to the value 12.

note


The Grid X and Grid Y settings don’t have to match, but both properties must be a value between 1 and 64. You won’t see grid points on a form if you use a setting of 1 or a setting larger than 24, but the setting will still influence the Snap To Grid feature discussed in the next section.

When you’ve finished working with the grid, clear the Grid option on the View menu to turn it off. The lines and grid points will disappear, as shown in Figure 8-4. To turn the grid back on, simply select the option; the menu item toggles the feature on and off.

figure 8-4. turn off the grid’s lines and grid points.

Figure 8-4. Turn off the grid’s lines and grid points.

Using Snap To Grid for Control Placement

By default, Access aligns the upper left corner of a control with the nearest grid point or line as you insert the control. That’s the Snap To Grid feature in action. When this feature is on, Access won’t allow you to position a control’s upper left corner between grid points.

Here’s a simple example of how Snap To Grid helps you align controls as you insert them:

  1. Open a blank form in Design view, or use the one you opened in the last example. (Be sure to toggle on the grid if you use the existing form.)
  2. Change the Grid X and Grid Y properties to 6. The greater the distance between the grid points, the greater the visual impact of Snap To Grid.
  3. On the Format menu, make sure Snap To Grid is checked.
  4. If the Toolbox isn’t open, click the Toolbox tool on the Form Design toolbar. Deselect the Control Wizards tool if it’s selected. You don’t want to launch any control wizards right now.
  5. Next click the Command Button tool, and then click between any two grid points to insert the button.

    Instead of positioning the button exactly where you clicked, Access aligns the control’s upper left corner with the grid point or line closest to the spot you clicked.

  6. Drag the button around the form a bit. Specifically, try to reposition the button between two grid points. Access simply won’t let you; it always aligns the control with the nearest grid point or line.
  7. On the Format menu, clear the Snap To Grid option to turn it off.
  8. Insert a second command button between two grid points. This time, Access inserts the button exactly where you clicked.
  9. Try moving either button. Now Access allows you to drop the button anywhere you want.

tip


You can temporarily disable the Snap To Grid feature by holding down the Ctrl key while you move a control.



Microsoft Access Version 2002 Inside Out
Microsoft Access Version 2002 Inside Out (Inside Out (Microsoft))
ISBN: 0735612838
EAN: 2147483647
Year: 2005
Pages: 172
Authors: Helen Feddema

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net