About adding data to a data access page by using the field list

When you use the field list (field list: A window that lists all the fields in the underlying record source or database object, except in data access page Design view. In data access page Design view, it lists all the record sources and their fields in the underlying database.) to add data to your data access page, Microsoft Access automatically creates controls (control: A graphical user interface object, such as a text box, check box, scroll bar, or command button, that lets users control the program. You use controls to display data or choices, perform an action, or make the user interface easier to read.) that are bound to the fields you add, just like it does with the form and report field list. However, the form and report field list and the data access page field list are not the same. Before you can add bound controls to a form or report, you must first bind the form or report to a specific record source. Once you do that, only the fields from that record source are displayed in the field list. A data access page, on the other hand, isn't bound until you add controls to it, and then it can be bound to more than one record source at a time. Therefore, the field list for a data access page displays all the fields you can choose from in the database to add to the page.

Before you can add data to a data access page, you must be connected to a Microsoft Access database (Microsoft Access database: A collection of data and objects (such as tables, queries, or forms) that is related to a particular topic or purpose.) or Microsoft SQL Server database (SQL database: A database that is based on Structured Query Language (SQL).). When the page is connected to one of these databases, the field list displays folders containing all of the tables or queries (query: A question about the data stored in your tables, or a request to perform an action on the data. A query can bring together data from multiple tables to serve as the source of data for a form or report.) available in the database.

ShowContents of a field list

In the field list, when you click the expand indicator Plus box next to a specific table or query, you'll see the list of fields for that record source. If the record source is a table, you'll see a Related Tables folder above the list of fields. The folder lists the tables and fields that are related to the table you expanded in the field list. If you rest the pointer on a table in the Related Tables folder, you'll see the field through which the tables are related. If you add fields directly from tables that are related, or if you add fields from queries that use related tables, Microsoft Access automatically uses the existing relationships (relationship: An association that is established between common fields (columns) in two tables. A relationship can be one-to-one, one-to-many, or many-to-many.) as you design the data access page. If you add fields to the page from tables that aren't related or from tables that have multiple relationships to tables already used on the page, Access will prompt you each time to define a new relationship. Relationships you define in this way are used only for the current data access page; they are not added to the database.

Field list

Callout 1 Buttons that display the connection information for the page, refresh the field list, and add the selected item to the current section of the page

Callout 2 The name of the database to which the page is connected

Callout 3 Table related to the Categories table

Callout 4 Fields in the Categories table

If you're working in a multiuser environment, you might want to refresh the field list occasionally in case others have added tables or queries since you began designing the data access page.

ShowAdding fields to the page

You can drag a single field, multiple fields from a table or query, or an entire table or query from the field list to the page.

When you drag a single field, Microsoft Access creates the appropriate individual control based on the type of data stored in the field. You can also choose the individual control you want it to create before you drag the field to the data access page.

When you drag a table, query, or multiple fields from a table or query to the page, if the Control Wizards tool Button image in the toolbox is selected, Access displays the Layout Wizard, which asks whether you want to add fields as individual controls (in columnar or tabular layout) or as a Web control (Microsoft Office PivotTable Component, Spreadsheet Component, or Chart Component). If you want to arrange the controls in a free-form custom layout, use columnar or tabular layout. Add fields as part of a Web control if you want to display data that you can rearrange, summarize, and otherwise analyze in different ways. If the Control Wizards tool is not selected when you drag multiple fields, a table or query, Access adds individual controls to the page.

 Note   The PivotTable list and chart have their own field lists, separate from the field list for the data access page. The field list of a component shows all of the fields you added from the data access page's field list to the component. It does not list all of the fields and record sources available in the database. If you remove a field from the PivotTable list or chart, the field remains in its field list so you can add it later. Unlike the data access page's field list, the component's field list is also available in the browser so that others using the page can add fields to the component as they're analyzing data.

ShowBuilding the page's data model

As you drag fields and record sources to the data access page and add group levels (group level: The depth at which a group in a report or data access page is nested inside other groups. Groups are nested when a set of records is grouped by more than one field, expression, or group record source.), change the sort order, and so on, Microsoft Access constructs a query behind the scenes that translates into Structured Query Language (SQL) (Structured Query Language (SQL): A database query and programming language widely used for accessing, querying, updating, and managing data in relational database systems.) what you've laid out on the screen and otherwise specified for the design. Using the existing relationships (relationship: An association that is established between common fields (columns) in two tables. A relationship can be one-to-one, one-to-many, or many-to-many.) that are defined between record sources, Access creates a query that retrieves the data you selected and presents it the way you've specified.

If you add fields from record sources that have no relationship, Access displays the Relationship Wizard so you can define the relationship yourself.

When you add a field to the data access page, Access also adds the field to the page's data model, which is the collection of data you've added to the page. The data model, represented on the data outline, shows which record sources are used for the page and how the data is related.

 
 
Applies to:
Access 2003