Creating Data Access Pages from Scratch
(Page 1 of 5 )
It's easy to create a Data Access Page in MS access by invoking the wizard. Still, you may want to know how to create a DAP from scratch. This article explains how to do it.
Introduction
In a previous tutorial, creating Data Access Pages (DAP) in MS Access was described. Importantly, the basic mechanics involved in crafting a DAP were discussed using the easiest of the methods -- invoking the wizard. While the easiest way to create such a page as described earlier fits in with the RAD features, one may need to know how to create a page starting from scratch.
This tutorial will show how to create a DAP using the design option starting from scratch. The demonstrated example is verified on a Windows XP Professional with MS Access 2002, SP1. As discussed in the previous article, the information about data and related information is stored in an .htm file for a DAP as against an .mdb file for data. Since it is in an .htm file, it is Microsoft DOM compliant. I recommend reviewing the first tutorial on DAP.
Since MS Access has undergone changes with the various versions by varying degrees of complexity and enhancements, it is necessary to have elements that work with older versions.
Creating a DAP in Design View
Start a DAP in design view
As with other Microsoft Office products, there is more than one way to create an object -- and so it is with DAP. Either you can use the menu item - Design, the short cut - Create a data access page in design view; or you can click on the menu Item New and follow the wizard. For any of these actions you get the response as shown in the picture. You will see that the page created in this version is not readily reusable in Access version 2000.

Clicking OK to this will bring up the design view of the page as shown. The areas on this page will bring up context sensitive pop-up menus relevant to that area. The title bar of this page, the label marked Click here and type the title text, the tabular region and the blank area will all bring up their related menus when right clicked to access their properties. I changed the title by typing in My First Page as shown.

Configuring the DAP in design view
By right clicking an empty region of the page, or the title bar, the Page1 properties can be accessed as shown here. If you are familiar with MS Access you will see this is a common way to configure an object in design. The three tabs, Format, data, and other provide all the design time information.

Next: Connecting to the database >>
More Microsoft Access Articles
More By Jayaram Krishnaswamy