Using Pages

Pages are similar to both forms and reports , and the type of page determines how you use it. If the page is meant for data entry, treat it just like a form (see Chapter 8). However, a few differences do exist, such as

  • Use the Tab key to move from one control to another just as you do in a form. (Unlike a form, though, pressing Enter does not select the next control.) The Tab key also selects the tools on the navigation bar. You must use the tools on the navigation bar to move to other records.

  • You must click the Save button on the navigation bar to save new records and editing changes. The page won't save those changes automatically like a form does.

Browsing Pages in Internet Explorer

Pages are meant to be viewed in a browser so you can update data via an Internet connection. This example shows you how to launch the page from inside Access, but you only do so can if you're sharing the database. If you opened the database exclusively, close the database and reopen it by clicking Open instead of Open Exclusively in the Open dialog box.

Launch the Plants page from inside Access by following these steps:

  1. Open the Plants page in page view.

  2. Right-click the page's title bar.

  3. Select Web Page Preview from the resulting shortcut menu, shown in Figure 10.13.

    Figure 10.13. Select Web Page Preview.


Figure 10.14 shows the page in Internet Explorer with the plants group expanded. The Address control displays the complete path to the .htm file (the page object). You could've launched the browser and entered that path to view the page.

Figure 10.14. View the page in your browser.


Now let's see what happens when you try to modify some data. First, highlight Wildseed Farms in the first record and try to delete the word Farms . Then, click the Save button on the navigation bar, which causes the following error message to pop up: You cannot add or change a record because a related record is required in table 'Catalogs' . That's because the CatalogName value is a foreign key value, and you enabled referential integrity in Chapter 6. Therefore, you can't enter a catalog unless it first exists in the Catalogs table. Currently, there is no catalog named Wildseed. Click OK to clear the error message, and then click the Undo button to cancel the change you tried to make.

Let's try another change. Select the CommonName value, highlight Susan , and delete it. Then, click the Save button. Now, return to your Access database, display the Database window by pressing F11 , and open the Plants table. As you can see in Figure 10.15, the Black-eyed Susan entry appears as just Black-eyed . Because the page and the database are connected, the change you made was dynamicyou actually changed the underlying data in the connected database.

Figure 10.15. The change you made in your browser updated the actual database table.


Absolute Beginner's Guide to MicrosoftR Access 2002
Absolute Beginner's Guide to MicrosoftR Access 2002
Year: 2002
Pages: 133 © 2008-2017.
If you may any questions please contact us: