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.

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

  1. Open the TypesAndPlants 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.

    graphics/10fig13.gif

  4. You may receive warning messages about trusting the page. If so, click OK to view the page.

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.

graphics/10fig14.gif

Now let's see what happens when you try to modify some data with the page open in the browser. 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. While you've got the table open, change the CommonName back to its original value.

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

graphics/10fig15.jpg



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

Similar book on Amazon

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