A Quick Overview of the Page Object

Before you actually learn how to create a page, let's look at a few and compare them to forms and reports . Northwind (the sample database that comes with Access) has a few pages we can use to demonstrate their design.

Note

graphics/nman.gif

You can download the Chapter 10.mdb sample file, which is inclusive of all the examples in this chapter, from http://www.quepublishing.com/. If you want to follow along with our examples, download Chapter 9.mdb .


Launch Northwind (close the opening splash screen and close the switchboard forms if necessary). Remember, you can launch Northwind by selecting Help, Sample Databases, Northwind Sample Database from the Access menu. Click the Pages shortcut on the Database window's Object bar, and Access displays a list of page objects. Hover the mouse pointer over any part of the page objects list. You'll notice that Access displays a ScreenTip that contains the name of the page, as shown in Figure 10.1. Access doesn't do this for other objects.

Figure 10.1. Access displays the page object's name in a ScreenTip.

graphics/10fig01.gif

Did you also notice that the object name contains an .htm extension? That's because a page object is really an HTML file. Unlike other Access objects, Access doesn't actually store page objects in the MDB file. The items listed in the Database window are shortcuts ( hyperlinks ) to the HTM files stored outside the MDB file.

Now, double-click the Review Products page to open it. Then, click the Maximize button so you can view more of it. This page lists all the products in alphabetical order, but they're grouped by their first letters . When you first open the page, it doesn't show any products. Click the arrow next to the letter A.

Figure 10.2 shows the result of clicking this control, called an expand/collapse control . After expanding a section, the arrow points down. To hide, or collapse , a section, simply click the arrow again.

Figure 10.2. Click the arrow next to the letter A to display products that begin with that letter.

graphics/10fig02.gif

After you expand a group, you can see that a page can be similar to a grouped report. In this case, each group consists of the products that begin with a common letter. A group heading of labels describes the data, and just below it, the group displays the actual data.

As is, this page is read-only. That means, even if you viewed it in a Web browser, that's all you'd be doingviewing data. It's a read-only object, and as such, you can't modify the actual product records in the Northwind database.

Note

graphics/nman.gif

A lookup field is a table-level user -defined data type that stores a value other than the value it displays. Learn more about lookup fields and how to create them in Chapter 6, "Tapping the Power of Relationships."


Comparing Forms, Reports, and Pages

The page object is similar in look and purpose to both the form and the report objects. Table 10.1 compares the three objects.

Table 10.1. Features of Forms, Reports, and Pages

Object's Purpose

Form

Report

Page

Updates data in an Access database application

Yes.

No.

Yes.

Interacts with live data via the Internet or an intranet

No.

No.

Yes.

Prints data for distribution.

You could, but you probably won't

Yes.

You might.

Can base the object on one or more tables or queries

Yes.

Yes.

Yes.

Inherits lookup fields.

Yes.

Yes.

No.

Supports graphics files.

Yes.

Yes.

No, but you can embed your own graphics directly in the page.



Absolute Beginner's Guide to Microsoft Office Access 2003
Absolute Beginners Guide to Microsoft Office Access 2003
ISBN: 0789729407
EAN: 2147483647
Year: 2002
Pages: 124

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