Try It Out Creating a New Data Access Page from a Form

At this point, you will create a new data access page from a form. After creating the form itself, you will export the form to the data access page using the OutputTo method. Now, let's get started.

1. Create a new form based on the tblComplaints table using the Wizard. From the Database Window, select Forms, and then Create Form By Using Wizard. On the first screen of the wizard, select all fields in tblComplaints to add to the new form and click the Next button. Specify Columnar for the layout and click Next two more times. On the last screen of the wizard, specify the name frmComplaints and click the Finish button. The form should look similar to that shown in Figure 8.8.

2. Next, add the following procedure to your module.

Figure 8.8

Sub OutputToDAP()

DoCmd.OutputTo acOutputForm, "frmComplaints", "c: \temp\frmcomplaintsDAP.html"


End Sub

3. Run the OutputToDAP procedure from the Immediate Window by typing the procedure name and pressing Enter.

4. Navigate to your hard drive and locate the file that was just created. Double-click the file to open it. A screen similar to the one shown in Figure 8.9 will be displayed.

5. Modify some of the data from the data access page.

0 0

Post a comment