...

View Full Version : Cannot line up table grid in repeat section that contains a table



TLB
05-08-2009, 06:18 AM
Hi I am making some changes to some existing code that I inherited that pulls information from an access database based on results from a drop down list.

I have a repeated section that contains a table.



<!--#include virtual="/policy/includes/DelegationHeader.asp" -->


<table width="620" border="1" cellspacing="2" cellpadding="1">
<tr>
<td width="65" align="left"valign="top" class="articletitle"><span class="style4"><strong>Employee ID</strong></span></td>
<td width="140"align="left" valign="top" class="normaltextunleaded"><strong>Name</strong></td>
<td width="160" align="left"valign="top" class="normaltextunleaded">Licence Type</td>
<td width="60" align="left"valign="top" class="normaltextunleaded">Status</td>
<td width="60" align="left"valign="top" class="normaltextunleaded">Date of Expiry</td>
</tr>
</table>
<%
While ((Repeat1__numRows <> 0) AND (NOT rsDelegationResults.EOF))
%>
<table width="620" border = "1" cellspacing="2" cellpadding="1">
<td width="65" align="left" valign="top" ><%=(rsDelegationResults.Fields.Item("ID_NUMBER").Value)%></td>
<td width="140" align="left" valign="top" nowrap="nowrap"><%=(rsDelegationResults.Fields.Item("Qual_Surname").Value)%>, <%=(rsDelegationResults.Fields.Item("Qual_Given_Name").Value)%></td>
<td width="160" align="left" valign="top" nowrap="nowrap"><%=(rsDelegationResults.Fields.Item("LicenseQualName").Value)%></td>
<td width="60" align="left" valign="top" nowrap="nowrap"><%=(rsDelegationResults.Fields.Item("Status Type").Value)%></td>
<td width="60" align="left" valign="top" nowrap="nowrap"><%=(rsDelegationResults.Fields.Item("Expiry date").Value)%></td>
</tr>
</table>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsDelegationResults.MoveNext()

Wend%>

<p>
<!--#include virtual="/policy/includes/PolicyFooter.asp" -->
<%rsDelegationResults.Close()
Set rsDelegationResults = Nothing
%>

I get the correct results however when displaying the results in the table I cannot get the grid lines on the columns to line up correctly.

The problem seems to be with the date fields where a day or month does not have a leading zero.

Here is a sample of the output:

9299 Brown, George First Aid - Senior Current 3/05/2009
9970 Peters, Jon First Aid - Senior Current 19/07/2011
9559 Smith, Steven First Aid - Senior Current 16/09/2011

See attached print screen of how output looks with grids.

Any advice on how to fix this problem would be appreciated.

Many thanks

TLB



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum