Getting to Know Microsoft Access, Part 7: Forms - Creating Your First Form
(Page 2 of 4 )
Go ahead and create your first form now so you can see what the form design window looks like. Select Design View and choose a record source on which to base your form. When you’re done you’ll see the form design window as shown below:

Access gives you the tools you need to design your form, including a design toolbar, a formatting toolbar, a toolbox, property sheets, fields lists, and alignment tools. The formatting toolbar is used to customize element appearances and the toolbox shows the available controls. Use the field list to drag fields from your record source to the design. Add controls to the design by clicking a control button in the toolbox and drawing in the design with your mouse. Create calculated controls by combining record source values in specific ways. For instance, suppose you have a record source from a costs database. You could create a calculated control by inputting values into a control by double-clicking a control, thus opening the properties dialog, and entering the calculated field into the control source property. You would then use an expression similar perhaps to one of the following:
[Price]*[Sales Tax]
Or
[Cost of Item]*1.09+[Shipping & Handling]
You can add symbols, such as the currency symbol, to the calculated field by setting the format property in the properties dialog. Choose the Currency option in the drop-down list in the Format property box. While you’re there notice the name of the unbound control you’ve created; it can be changed to suit your needs. That name is what Access uses to reference the control in macros, expressions, and procedures.
Tip 1: Assign the current date to a field by typing the following in the control’s Default Value property:
=Date()
Tip 2: Add a validation rule to a control in a form by entering the appropriate validation expression in the Validation Rule property.
Conditional formatting is another useful feature. It allows you to manipulate what certain controls look like under specified conditions. To use this feature just select the control you want to change, choose the Format | Conditional Formatting menu option and make your selections in the dialog box. You can set up to three conditions for changing a control’s text or background color, or text formatting such as bold, italic, or underline. You can set the following conditions:
- Set the "Field Value is" condition to specify a value or range of values to which to apply formatting,
- Set the "Expression Is" condition to specify what happens when an expression you enter is true, and;
- Set the "Field has Focus" condition to make changes to a field that has current focus.
You can change the style of a form by opening the form in design view and choosing the form selector (upper-left corner), and then choosing the Format | AutoFormat menu option. Click the Options button to customize the properties of the design. This is a handy feature, especially if, like me, you are not satisfied with the design options Access gives you.
Next: The Form Wizard >>
More Microsoft Access Articles
More By Sage Adams