Part I: Access Building Blocks
304
Creating a bound form
A bound form is directly connected to a data source, such as a table or query. Bound forms usually
automatically update data in the bound data source when the user moves to a new record in the
form.
To create a bound form, you must specify a data source in the form’s Record Source property.
In Figure 8.10, the Data tab of the Property Sheet contains the properties controlling what and
how data is displayed on the form. Although not shown here, the Record Source property is at
the very top of the Property Sheet’s Data tab.
The data source can be one of three choices:
l Table: The name of a table in the current database file. The table can be a local table
(stored in the database itself) or can be linked to another Access database or an external
data source such as SQL Server.
l (^) Query: The name of a query that selects data from one or more database tables.
l SQL Statement: A SQL SELECT statement that selects data from a table or query.
When a form is unbound — the Record Source property is blank and the data is obtained with
VBA code — you can’t have bound controls on the form. (Bound controls have their Control
Source property set to a field in a table.)
Cross-Reference
For more information on adding bound controls with the Field List, see Chapter 7.
Specifying how to view the form
Access uses several properties to determine how a form is viewed. The Default View property
determines how the data is displayed when the form is initially opened:
l Single Form: Displays one record at a time. Single Form is the default and displays one
record per form page, regardless of the form’s size.
l Continuous Forms: Shows more than one record at a time. Continuous Forms tells
Access to display as many detail records as will fit on-screen. Figure 8.11 shows a contin-
uous form displaying five records.
l (^) Datasheet: Row and column view like a spreadsheet or the standard query Datasheet
view.
l (^) PivotTable: A datasheet with movable columns that can be swapped with rows. A
PivotTable form displays a form’s fields horizontally or vertically and then calculates the
total of the row or column.
l PivotChart: A graph made from a pivot table. The PivotChart setting displays a graphical
analysis of data stored in a table, query, or form.