Microsoft KB Archive/304320

= ACC2002: How to Use Data Access Pages to Store and Display HTML Tags =

Article ID: 304320

Article Last Modified on 9/27/2006

-

APPLIES TO


 * Microsoft Access 2002 Standard Edition

-



This article was previously published under Q304320



Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).



SUMMARY
By using the Bound Span control on a data access page, you can store HTML tags in a field in a table, and then display the HTML on the page. This article shows you how to do this.



MORE INFORMATION
The following section shows you how to create a table with a field that contains the HTML tags. Then, it shows you how to create a data access page that has a Bound Span control to display the HTML.

Creating the Table
 Open the sample database Northwind.mdb.  Create a new table as follows:   Table: tblHtml -  Field Name: ID   Data Type: Autonumber

Field Name: SomeHtml Data Type: Memo

Table Properties: tblHtml -  PrimaryKey: ID                      Open the table in Datasheet view, and then type or paste the following data in the Somehtml field. Insert each line in a separate record. This is heading Level 2 in html This is bold in Html Table of Contents</H2> <OL> <BR> <LI>Introduction <LI>Company History <LI>Products offered</OL> </li> Close the table.</li></ol>

Creating the Data Access Page

 * 1) Create a new page in Design view.
 * 2) In the field list, expand Tables, and then expand tblHtml.
 * 3) In the toolbox, click the Bound Span control.
 * 4) Drag the SomeHtml field from the field list to the page.
 * 5) Open the properties sheet for the Bound Span control, and then click the Data tab.
 * 6) Change the DataFormatAs property from Text to HTML.
 * 7) Open the data access page in Page view.

Note that the Bound Span control recognizes the HTML tags from the table and displays them with the correct formatting.

Additional query words: inf dap

Keywords: kbhowto KB304320

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.