Creating and Modifying Data Access Pages


If a database is available on a local computer or over a network, accessing it is no problem. But if you want to allow people who don t have direct access to your database to view or edit its contents, you need to create data access pages , which provide access to your database through the Internet or an intranet. Data access pages are forms that are coded with Hypertext Markup Language (HTML) so that they can be viewed using a web browser, such as Microsoft Internet Explorer.

start sidebar
Creating data access pages from scratch

If you want to create a data access page from scratch, you can do so in Design view. To do this, click the Pages icon on the Objects bar, and then click the New button to display the New Data Access Page dialog box. Click Design View, select the table or query you want to base the page on, and click OK. In Design view, you can create a data access page using many of the same techniques you use to create forms. To add fields to the data access page, drag them from the Field List box. You can use buttons on the Toolbox toolbar to add other objects to the page, and the buttons on the Alignment and Sizing toolbar to modify the alignment and sizing of controls and labels. When you finish, switch to Page view to get an idea of what your page will look like in a web browser.

end sidebar
 

Converting a Table to a Data Access Page

Follow these steps to convert an existing table to a data access page:

  1. In the Database window s Tables list, click Customers .

  2. Click Page in the New Object button s drop-down list.

    click to expand

    The New Data Access Page dialog box appears, as shown in this graphic:

  3. In the Choose the table or query where the object s data comes from drop-down list, make sure that Customers is selected, and then double-click Page Wizard .

  4. On the wizard s first page, click the >> button to move all the available fields to the Selected Fields box, and then click Next .

  5. On the wizard s second and third pages, click Next to accept the default selections.

  6. With Customers specified as the title for the page, select the Open the page option, and click Finish .

    Access creates the data access page shown in this graphic:

    click to expand
  7. On the Access toolbar, click the Save button.

    Because data access pages are saved as separate files as well as components of the database, Access displays the Save As Data Access Page dialog box.

  8. Type Customers as the file name , click Save to save the file in the My Documents folder, and click OK when Access displays a warning about UNC.

    You can ignore the message about UNC (Universal Naming Convention) for now, because you are the only person who will open this page. If you publish data access pages to a web server, you need to use a UNC path (that is, a path that follows the format \\ webserver \ wwwroot \my_ files ), because this path is stored in the page and will be used when someone accesses the page from the World Wide Web.

start sidebar
Protecting fields on a data access page

By default, Access allows anyone to enter records into the database through a data access page. But most data access pages are meant to provide a way of viewing information in a database, not changing it. To modify a data access page to protect your information, click the Pages icon on the Objects bar and double-click the data access page you want to protect. Click the View button to switch to Design view, click the first control to select it, and then click the Properties button. On the Other tab, click the ReadOnly box, click the down arrow, and then in the drop-down list, click True. Leaving the Properties dialog box open, select each of the controls in turn , and set their ReadOnly properties to True. Then close the Properties dialog box. If you designate a data access page as ReadOnly, you don t need the New Record, Delete Record, Save Record, or Undo Record buttons on the navigation bar. In Design view, click each button and press Delete.

end sidebar
 

Viewing a Data Access Page in Internet Explorer

Now let s see how the new page looks when displayed by Internet Explorer. (If you aren t using Internet Explorer, you might have different menu commands and dialog boxes than those shown here. Follow along with these steps using the appropriate commands for your web browser.)

  1. Start your web browser.

    You can work online or offline.

  2. On the web browser s File menu, click Open .

    A dialog box like the one shown in this graphic opens:

  3. Click the Browse button, and navigate to the My Documents folder, where Access has stored your data access page as an HTML file. Select the Customers file, click the Open button, and then click OK .

    The page should now look like the example shown in this graphic:

    click to expand
  4. Try out the navigation bar by clicking the Next Record or Last Record button. Then return to the first record.

Sorting and Filtering in a Data Access Page

Let s experiment with different ways of viewing information in the data access page:

  1. Click Western Construction Co. in the Name control, and then click the Sort Ascending button.

  2. Move through the records to verify the new sort order, and then return to the original order by double-clicking any customer number and clicking the Sort Ascending button.

  3. Double-click Lakewood in the displayed record to select it, and on the data access page toolbar, click the Filter by Selection button.

The record indicator on the toolbar shows that five records have the value Lakewood in the City field.

  1. Click the Filter Toggle button to remove the filter.

  2. Close your web browser window, and then close the Roofs database.




Online Traning Solutions - Quick Course in Microsoft Office XP
Online Traning Solutions - Quick Course in Microsoft Office XP
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 116

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net