Form design in Microsoft Access


The Access Form Design Wizard will build a form very quickly but the design is inadequate for any table with more than a few fields. A well-designed form makes a database much easier to use.

The Wizard arranges the fields of the table on a form in a single column. You will want to move these fields, gathering similar items together into logical groups. To do this you have to select the fields on the form, move them around, and put them into the right order. Access gives you many choices for all three tasks in the Form Designer.

Selecting fields

The obvious way to select a single field is to click on it. There are three ways of selecting more than one field:

  • Select all fields in a line across or down the form by clicking in the ruler on the left or the top of the form design area.
  • Select many fields one at a time by holding the SHIFT key down as you click on the fields. SHIFT+clicking on a selected field will deselect it.
  • Select many fields at once by clicking in a blank area of the form, holding the mouse key down, and moving the mouse. This draws a box that will select any control it touches

Moving fields

The obvious way to move a field is to click on it, hold the mouse down, and drag it to a new position. These alternatives give you more control:

  • Use the cursor arrow keys for precise adjustments. Select the field or fields, then hold the CTRL key down and use the up, down, left, and right cursor keys to nudge the field around a form.
  • Tick the Grid option on the View menu to show or hide a grid as a guide.
  • Use the Align option on the Format menu to line fields up neatly. This option will be greyed out until you have more than one field selected. You can align the top, bottom, left, or right edges of the fields or align the fields with the grid.

All these techniques move other controls like labels and pushbuttons in the same way that they move fields. Note that a label will follow its field when that moves but a field won’t follow when you move its label.

Ordering fields

When the user tabs between fields on a form, the order is the same as the order in which the fields were added to the form. This is unlikely to be the best order for the user. Use these techniques to change it:

  • Select Tab Order on the View menu and click Auto Order to set the fields in a natural left-to-right, top-to-bottom order.
  • Select Tab Order on the View menu and drag fields up and down the list to put them in the right order.
  • An ampersand (&) anywhere in the caption of a button or text box underlines the next letter and makes that letter the hot key. If you type &City as the caption then Access will display City on the form and the user can jump to that control by pressing ALT+C.

Hints & tips

The textbox class in Visual FoxPro 9 has a new Autocomplete property which shows the user the previous values that have been entered in that textbox.
Autocomplete in VFP 9

Your Access database will look more impressive if you add custom toolbars...
Custom toolbars

FoxPro has always had functions to read and write files at a low level...
Foxpro low level file functions

More...
More pages of hints and tips for users of Microsoft FoxPro and Access databases.

Site Map