Online Book Reader

Home Category

Access Cookbook - Ken Getz [279]

By Root 2075 0
the pages must have Office 2000 licenses, DAPs were not widely used.

In Access 2002, DAPs were greatly enhanced. The designer is now on par with Access's form and report designers. Data on pages can be updated under most circumstances, and users without Office XP licenses can legally work with DAPs in the browser, albeit with a limited feature set. However, you'll still need to use Microsoft Internet Explorer 5 and later to view and work with DAPs, and users will still need to have the Office Web Components installed locally.

Perhaps the biggest limitation to DAPs is the way they connect to data. DAPs use ADO recordsets behind the scenes to retrieve and update data. These ADO recordsets are opened on your users' machines, which means that your users must have direct access to the data. The only workaround—using recordsets that are opened on a web server—requires that you set up a complicated technology called Remote Data Services (RDS), which goes beyond the scope of this book. Without RDS, you can't use DAPs to work with data over the Internet, even though you can view the data in a browser.

Still, the Access 2002 implementation has made DAPs a feasible and welcome choice for displaying and editing data, particularly on an intranet (because of the IE and local processing requirements). Database developers may also find that DAPs provide a good starting point in acquiring web database skills.

DAPs are quite different from Access forms and reports. In this chapter, we'll address issues that you are likely to encounter as you begin to use DAPs. Many of these issues involve getting the page to look the way you want it to look. We'll also talk about how you can keep your pages and data properly linked together, and we'll show you how you can use VBScript to add new functionality to your pages.

In order to use any of the existing samples in your own environment, you will need to update the ConnectionString property for each page. Within Access, when you attempt to open the existing pages in the page designer, you'll receive a warning indicating that the connection is invalid. Right-click on the page within the designer, select the Page Properties item from the context menu, and select the Data tab in the Properties window. Select the ConnectionString property, and click the build button (...) to the right of the property. On the Connection page of the Data Link Properties dialog box, browse to the appropriate location of the sample database. The Solutions in Recipe 13-5 and Recipe 13-6 show techniques to avoid this extra step.

TIP

DAPs in Access 2002 and Access 2003 are very different from DAPs in Access 2000. Not only did Microsoft greatly enhance the functionality of pages designed in Access, but the designer itself also includes many more features. Therefore, we have not addressed the Access 2000 version of DAPs in this chapter.

13.1. Replace Navigation Button Images with Your Own Images


Problem


The navigation section in a DAP uses button images that are different from the rest of the pages on your intranet. How can you use your own images on the navigation buttons of a DAP?

Solution


The image on a navigation button is named in the button's Src property. By default, the Src property for each navigation button is set to an image stored within the Office Web Component library. You can change the property's value to name an image of your own choosing. You can (and should) also provide an "inactive" version of the image that can be displayed when the button is not relevant to the current context. For example, the First and Previous navigation buttons should be disabled when the user is viewing the first record. The code to change the image based on context has already been written for you; you need only supply an image in the same location and with the same name as the active version of the button, but with the string "Inactive" appended to the name. That is, you might have one image named MyFirstButton.gif and another named MyFirstButtonInactive.gif.

TIP

In order to try out the sample provided for this

Return Main Page Previous Page Next Page

®Online Book Reader