I am trying to create a Site map using the data from an Access database that my intranet already utilises, but I have a little problem.

The following code sorts my data OK but I only want the Document Group Field to appear once at the top of that grouped data. I then want for this to loop again as the Document Group field has multiple values.

Does this make sense ?

Code:
<table width="100%">
<%
i = 0
	On Error Resume Next
	rs.MoveFirst
		do while Not rs.eof
		if (i mod 2) = 1 Then
%>
	<tr>
		    <td colspan="2" width="100%" align="left"><font class="fieldtitle"><%=rs.Fields("DocumentGroup")%></font>&nbsp;</td> 	
	</tr>	
  <tr>
    <td width="2%" align="right"><img src="../images/navlink_blue.GIF" width="5" height="7">&nbsp;</td> 
    <td width="98%"><font class="description"><a href="<%=rs.Fields("DocumentName")%>" target="_blank"><%=rs.Fields("DocumentDescription")%></a></font></td>
  </tr>
<%
Else
%>
	<tr bgcolor="#ffffff">
		    <td colspan="2" width="100%" align="left"><font class="fieldtitle"><%=rs.Fields("DocumentGroup")%></font>&nbsp;</td> 	
	</tr>
  <tr bgcolor="#ffffff">
    <td width="2%" align="right"><img src="../images/navlink_blue.GIF" width="5" height="7">&nbsp;</td> 
    <td width="98%"><font class="description"><a href="<%=rs.Fields("DocumentName")%>" target="_blank"><%=rs.Fields("DocumentDescription")%></a></font></td>
  </tr>
<%
End If
i = i+1
rs.MoveNext
loop
%>  
</table>