Image courtesy of ddpavumba at

Microsoft Access allows you to export data from any of its 4 main objects (tables, queries, forms & reports) as HTML — another example of the advantages of Microsoft Office applications’ interoperability.

As the data is tabulated Access outputs HTML webpages with tables displaying the data. Below is an excerpt of such HTML:

<TH BGCOLOR=#c0c0c0 BORDERCOLOR=#000000 ><FONT style=FONT-SIZE:11pt FACE="Calibri" COLOR=#000000>TrackID</FONT></TH>
<TH BGCOLOR=#c0c0c0 BORDERCOLOR=#000000 ><FONT style=FONT-SIZE:11pt FACE="Calibri" COLOR=#000000>TrackName</FONT></TH>
<TH BGCOLOR=#c0c0c0 BORDERCOLOR=#000000 ><FONT style=FONT-SIZE:11pt FACE="Calibri" COLOR=#000000>TrackLyrics</FONT></TH>
<TH BGCOLOR=#c0c0c0 BORDERCOLOR=#000000 ><FONT style=FONT-SIZE:11pt FACE="Calibri" COLOR=#000000>TrackArtistName</FONT></TH>
<TD BORDERCOLOR=#a6a6a6  ALIGN=RIGHT><FONT style=FONT-SIZE:11pt FACE="Calibri" COLOR=#000000>4964</FONT></TD>
<TD BORDERCOLOR=#a6a6a6 ><FONT style=FONT-SIZE:11pt FACE="Calibri" COLOR=#000000>Don't Worry Be Happy</FONT></TD>
<TD BORDERCOLOR=#a6a6a6 ><FONT style=FONT-SIZE:11pt FACE="Calibri" COLOR=#000000>Here's a little song I wrote<BR>You might want to sing it note for note<BR>Don't worry, be happy<BR>In every life we have some trouble<BR>But when you worry you make it double<BR>Don't worry, be happy<BR>Don't worry, be happy now</FONT></TD>
<TD BORDERCOLOR=#a6a6a6 ><FONT style=FONT-SIZE:11pt FACE="Calibri" COLOR=#000000>Bobby McFerrin</FONT></TD>

The HTML produced is a mixed bag of old and new syntax. Opening the HTML files and editing them in Notepad++ is simple enough. You will encounter some random errors, such as the bordercolor attribute being applied to the <tr> instead of the <table> tag and the incorrect nesting of the <font> tags outside the <caption> tags.

Some quick corrections that must be made using the Replace (CTRL+H) feature in Notepad++:

  • All HTML tags and attributes are in uppercase
  • The attribute values are not in inverted commas
  • There is a mix of HTML formatting and inline CSS style formatting
<table border="1" bordercolor="#a6a6a6" bgcolor="#ffffff" cellspacing="0">
	<caption><font face="Calibri" color="#000000"><b>frmLyrics</b></font></caption>
			<th bgcolor="#c0c0c0"><font style="font-size: 11pt" face="Calibri" color="#000000">TrackID</font></th>
			<th bgcolor="#c0c0c0"><font style="font-size: 11pt" face="Calibri" color="#000000">TrackName</font></th>
			<th bgcolor="#c0c0c0"><font style="font-size: 11pt" face="Calibri" color="#000000">TrackLyrics</font></th>
			<th bgcolor="#c0c0c0"><font style="font-size: 11pt" face="Calibri" color="#000000">TrackArtistName</font></th>
		<tr valign="top">
			<td align="right"><font style="font-size: 11pt" face="Calibri" color="#000000">4964</font></td>
			<td><font style="font-size: 11pt" face="Calibri" color="#000000">Don't Worry Be Happy</font></td>
			<td><font style="font-size: 11pt" face="Calibri" color="#000000">Here's a little song I wrote<br />
				You might want to sing it note for note<br />
				Don't worry, be happy<br />
				In every life we have some trouble<br />
				But when you worry you make it double<br />
				Don't worry, be happy<br />
				Don't worry, be happy now</font></td>
			<td><font style="font-size: 11pt" face="Calibri" color="#000000">Bobby McFerrin</font></td>

When you export a multi-page report, Access outputs multiple linked HTML pages — one for each page of the report which is very handy.

By MisterFoxOnline

CAT Educator

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.