ACC97: Blank Records Do Not Show in Table Exported as HTML

Last reviewed: September 24, 1997
Article ID: Q174089
The information in this article applies to:
  • Microsoft Access 97

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 Technical Support engineers 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 <BR> tag in the HTML code. Replace the <BR> tag with "&nbsp;" (without the quotation marks); then, the table will correctly display the blank records.

To see the blank records displayed correctly, follow these steps:

  1. Start Microsoft Access and create a new table named TstHTMLBlank.
     In Design view, create two fields, TestName as Text and TestDate as
     Date.

  2. Add eight records to the table.

  3. Using the BACKSPACE key, 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.

  4. Save and close the table.

  5. On the File menu, click Save As HTML. When the "Publish to Web
     Wizard" appears, click Next on the opening screen.

  6. On the "What do you want to publish?" screen, click the TstHTMLBlank
     table, and then click Next.

  7. Click Next on the screen that prompts you to select a default
     template.

  8. On the "What default format type do you want to create?" screen,
     click Static HTML, and then click Next.

  9. On the "Where do you want to publish to?" screen, select C:\My
     Documents, and then click Finish.

 10. Open Microsoft Internet Explorer, and then follow these steps:

      a. On the File menu, click Open, and then click Browse.

      b. In the Open dialog box, in the "Look In" box, browse to the My
         Documents folder.

      c. In the My Documents folder, select the TstHTMLBlank_1.html file,
         and then click Open.

 11. 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.

 12. 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:

        <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>

 13. Use a Text Editor such as Notepad to replace the <BR> tag with
     &nbsp; as follows:

        <TR VALIGN=TOP>
        <TD BORDERCOLOR=#c0c0c0 ><FONT SIZE=2 FACE="Arial"
            COLOR=#000000>&nbsp;</FONT></TD>
        <TD BORDERCOLOR=#c0c0c0  ALIGN=RIGHT><FONT SIZE=2 FACE="Arial"
            COLOR=#000000><BR></FONT></TD>

        </TR>

 14. On the File Menu, click Save.

 15. Click Close.

 16. On the View Menu, click Refresh. Note that the table displays the
     lines for the blank records as expected.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Repeat steps 1 - 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.


Additional query words: 97
Keywords : Accinternet IntAsp
Version : WINDOWS:97
Platform : WINDOWS
Hardware : x86
Issue type : kbprb
Solution Type : Info_Provided


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 24, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.