About data access pages

Microsoft Office Access 2003

Using a data access page is similar to using a form: You can view, enter, edit, and delete data in a database. However, you can also use a page outside a Microsoft Access database, so users can update or view data over the Internet or an intranet.

The following illustration shows how the Product data access page, which is used for entering and updating product information, looks in Page view or in Microsoft Internet Explorer 5.01 with Service Pack 2 (SP2) or later.

Data access page in Page view

Callout 1 Enter product information in the text boxes, drop-down list box, and check box.

Callout 2 Use the record navigation toolbar to navigate, add, delete, save, sort, and filter records, and to get Help.

ShowA page in Design view

The following illustration shows the Products data access page in Design view.

Parts of a data access page in Design view

Callout 1 Title in the body of the page

Callout 2 Group header for the Products group level

Callout 3 Record navigation section for the Products group level

ShowParts of a data access page

The body    The body is the basic design surface of a data access page. On a page that supports data entry, you can use it to display informational text, controls bound to data, and sections.

Sections    You use sections to display text, data from a database, and toolbars.

Two types of sections are typically used on pages that support data entry: group header and record navigation sections. A page can also have footer and caption sections.

  • Group header and footer    Used to display data and calculate values.
  • Record navigation    Used to display the record navigation control for the group level. A record navigation section for a group appears after the group header section. You can't place bound controls in a record navigation section.
  • Caption    Used to display captions for text boxes and other controls. It appears immediately before the group header. You can't place bound controls in a caption section.

Each group level in a data access page has a record source. The name of the record source is displayed on the section bar for each section used for a group level.

ShowDesigning different types of data access pages

You design data access pages in Design view in Microsoft Access. The page is a separate file that is stored outside Access; however, when you create the file, Access automatically adds a shortcut to the file in the Database window. Designing a data access page is similar to designing forms and reports— you use a field list, the toolbox, controls, and so on. However, there are some significant differences in the way that you design and interact with data access pages as opposed to forms and reports. How you design the page depends on what it will be used for:

  • Interactive reporting    This type of data access page is often used to consolidate and group information that is stored in the database, and then publish summaries of the data. For example, a page might publish the sales performance for each region in which you do business. Using expand indicators, you can go from a general summary of the information, such as a list of all the regions and their combined sales total, to specific details on individual sales within each region. The data access page might provide toolbar buttons for sorting and filtering the data, as well as for adding, editing, and deleting the data in some or all group levels.
  • Data analysis    This type of data access page may include a PivotTable list, similar to a Microsoft Excel PivotTable report, that lets you reorganize the data to analyze it in different ways. The page might contain a chart that you can use to analyze trends, detect patterns, and compare data in your database. Or it might contain a spreadsheet, in which you can enter and edit data and use formulas to calculate as you do in Excel.

ShowUsing data access pages in Internet Explorer

A data access page is connected directly to a database. When users display the data access page in Internet Explorer, they are viewing their own copy of the page. That means any filtering, sorting, and other changes they make to the way the data is displayed— including changes they make within a PivotTable list or spreadsheet— affect only their copy of the data access page. However, changes that they make to the data itself— such as modifying values, and adding or deleting data— are stored in the underlying database, and therefore are available to everyone viewing the data access page.

Users get Help on how to work with the page in Internet Explorer by clicking the Help Button image button on the record navigation toolbar. The Help file that appears is automatically included with any data access page that's published with a record navigation toolbar. If you delete the record navigation toolbar or if you disable its Help button, you should provide instructions for using the page to those who will use the page.

Note  To view and work with the data access page on the Internet or an intranet, users need Microsoft Internet Explorer 5.01 with Service Pack 2 (SP2) or later.

ShowUsing data access pages in Microsoft Access

You can also work with a data access page in Page view in Access. Data access pages can supplement the forms and reports that you use in your database application. When deciding whether to design a data access page, form, or report, consider the tasks that you want to perform.

You get Help on how to work with the page in Page view by clicking the Help Button image button on the Page View toolbar to display Access Help. Clicking the Help button on a record navigation toolbar on the page displays Help for working with the page in Microsoft Internet Explorer. As mentioned previously, this Help file is automatically included with any data access page that's published with a record navigation toolbar. You can delete the Help button on pages that are used only within Access, or you can modify the button to provide custom Help.

ShowWhere a data access page gets its data

ShowTypes of data sources for a data access page

A data access page gets its data from a Microsoft Access database, or a Microsoft SQL Server database version 6.5 or later. To design a page using data from one of these databases, the page must be connected to the database. If you have already opened an Access database or an Access project that's connected to a SQL Server database, the data access page you create automatically connects to the current database and stores that path in the ConnectionString property of the data access page. When a user browses to the page in Microsoft Internet Explorer 5.01 with Service Pack 2 (SP2) or later or displays the page in Page view, it displays current data from the underlying database by using the path defined in the ConnectionString property. If you design the data access page while the database is on a local drive, Access will use the local path, which means the data won't be accessible to others. For this reason, it's important that you move or copy the database to a network location that's accessible to users of your page. Once the database is on the network share, open the database using the UNC address. If you move or copy the database after you've already designed the page, you'll have to update the path in the ConnectionString property to point to the new location.

Instead of having to update the ConnectionString property of each page in the database separately, you can choose to create a connection file. A connection file stores the connection information for a data access page, and can be shared between multiple data access pages. When you open a data access page that uses a connection file, the page reads the connection file and connects to the appropriate database. After creating the connection file, if you move or copy the database, all you have to do is edit the connection information in the connection file.

ShowTypes of data sources for Microsoft Office Web Components on a data access page

Although the data access page gets its data from a Microsoft Access database or Microsoft SQL Server database, Microsoft Office Web Component controls on the page can display data from either of these databases or from other sources. For example, the page may contain a PivotTable list, spreadsheet, or chart with data from a Microsoft Excel worksheet or a database other than Access or SQL Server. Depending on the data source, the data in these controls may be a snapshot of the original data or it may be live data displayed through a separate connection that the control has with its data source.

To create an Office Web Component with data from a source other than the current database, you might have to use a program other than Access to first publish the data to a Web page. For example, to create a PivotTable list that contains data from an Excel worksheet, you have to publish the data from Excel. Then, in Access, you can open the Web page and turn it into a data access page by adding controls that are bound to an Access or SQL Server database. You can further customize the page by adding labels, pictures, or other features to enhance the page's appearance. From within Access, you can create a PivotTable list that uses data from an external source other than Excel.

Security Note Data access pages aren't actually stored in the Access file; they are stored as HTML files either in the local file system, in a folder on a network share, or on an HTTP server. For this reason, Microsoft Access has no control over the security of data access page files. To help protect the data access page, you must employ security measures for its link and HTML file by using the file system security of the computer where you have stored these files. To help protect the data accessed by the page, you must either employ security measures for the database that the page is connected to or configure Microsoft Internet Explorer security settings to prevent unauthorized access.