Microsoft KB Archive/197951

= ACC2000: Blank Records Do Not Show in Table Exported as HTML =

Article ID: 197951

Article Last Modified on 7/16/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q197951





SYMPTOMS
Advanced: Requires expert coding, interoperability, and multiuser skills.

When you export a table that contains consecutive blank records to HTML format, you see one blank line instead of a blank line for each record.



RESOLUTION
NOTE: This example contains information about editing ASP files. It assumes that you are familiar with Active Server, Visual Basic Scripting, and editing HTML files. Microsoft Access Product Support professionals do not support modification of any HTML, HTX, IDC, or ASP files.

When you export a table to HTML format, the blank record is represented by a  tag in the HTML code. Replace the  tag with ; then, the table will correctly display the blank records.

To see the blank records displayed correctly, follow these steps:  Start Microsoft Access and create a new table named TstHTMLBlank. In Design view, create two fields: TestName as Text, and TestDate as Date. Add eight records to the table. Use the BACKSPACE key to remove five consecutive records. Do not use the DELETE key to remove the records; you only want to remove the data so that the fields are empty. Save and close the table. On the File menu, click Export.</li> On the "Export Table TstHTMLBlank As" screen, move to the My Documents folder.</li> Click the arrow in the Save As Type box, select HTML Documents, and then click Save.</li> Open Microsoft Internet Explorer, and then follow these steps: <ol style="list-style-type: lower-alpha;"> On the File menu, click Open, and then click Browse.</li> In the Open dialog box, in the "Look In" box, browse to the My Documents folder.</li> In the My Documents folder, select the TstHTMLBlank_1.html file, and then click Open.</li></ol> </li> In the Open dialog box, click OK.

Note that you see the table displayed with one blank line instead of a blank line for each blank record as expected.</li>  Using the right mouse button, click the screen, and then click View Source on the menu that appears.

Note that for each blank record, a line similar to the following appears in the source: <pre class="fixed_text">  <TR VALIGN=TOP> <TD BORDERCOLOR=#c0c0c0 ><FONT SIZE=2 FACE="Arial" COLOR=#000000><BR></FONT></TD> <TD BORDERCOLOR=#c0c0c0 ALIGN=RIGHT><FONT SIZE=2 FACE="Arial" COLOR=#000000><BR></FONT></TD>

</TR> </li>  Use a text editor, such as Notepad, to replace the <BR> tag with  as follows: <pre class="fixed_text">  <TR VALIGN=TOP> <TD BORDERCOLOR=#c0c0c0 ><FONT SIZE=2 FACE="Arial" COLOR=#000000> </FONT></TD> <TD BORDERCOLOR=#c0c0c0 ALIGN=RIGHT><FONT SIZE=2 FACE="Arial" COLOR=#000000><BR></FONT></TD>

</TR> </li> On the File Menu, click Save.</li> Click Close.</li> On the View Menu, click Refresh. Note that the table displays the lines for the blank records as expected.</li></ol>

<div class="moreinformation_section">

Steps to Reproduce Behavior

 * 1) Repeat steps 1 through 9 in the "Resolution" section to create the HTML file.
 * 2) Open Microsoft Internet Explorer.
 * 3) On the File menu, click Open.
 * 4) In the Open dialog box, click Browse.
 * 5) In the Look In box, browse to the My Documents folder.
 * 6) In the My Documents folder, select TstHTMLBlank_1.HTML. Click Open, and then click OK in the Open Dialog Box.

Note that the table is displayed, and you see one blank line instead of a blank line for each record.

Keywords: kbprb KB197951

-

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

© Microsoft Corporation. All rights reserved.