Access VBA Macro Programming

(Joao Candeias) #1

To display your form, click the Design tab in the ribbon and then click the Form View
icon in the Views group of the ribbon. Your form should look like Figure 9-2, depending on
the fields you selected from the customer table for display purposes.
At the bottom of the form, you can see record selectors that allow the user to navigate
backward and forward through the records. You will also see the number of records
displayed.
You can easily apply filters and sorts to the form by clicking the Home tab on the ribbon
and then using the Sort and Filter icons in the Sort & Filter group of the ribbon. This assumes
that the “Allow Filters” property for the form is set to Yes. There is also a search box next to
the record selectors at the bottom of the form that allows search text to be entered.
If you have chosen a record source that is updatable—such as a query that does not have a
many-to-many relationship, or a table—then the record selector group of buttons will also
contain a blank record icon that allows a new record to be added. This is also dependent on
the “Allow Additions” property on the form being set to Yes.
If the “Allow Edits” and “Allow Deletes” properties are also set to Yes, then the user can
also make changes to records or delete a record using this form, which is where there can be
dangers. It is very easy when viewing a form such as this to inadvertently change a field. As


Chapter 9: Forms and Reports 99


Figure 9-1 A new form in Design mode with a text box

Free download pdf