Dear All,
I am retreiving some data from an Access database. My code is retreiving all the fields I want, however, instead of 5 dates, it is only retreiving 3 dates, so I guess I have something wrong with my loop. Hereunder I am attaching the piece of code that is giving me trouble. I appreciate a lot all the help you can give me. Thanks
<%
Case 2
titlerep = "Milestones Summary"
%>
<table width="78%" height="77" border="1" cellpadding="0" cellspacing="0">
<%
rs.MoveFirst
' while not rs.EOF
do
curDate = rs("project_date"
%>
<tr bgcolor="#CCCCFF">
<td height="23" nowrap colspan="8"> <font face="Arial, Helvetica, sans-serif" size="2"><b>Date</b>
<%
Response.Write( rs.Fields("project_date"
)
%> </font> </td>
</tr>
<%
do
curArea = rs("company_area_id"
%>
<tr bgcolor="#CCFFCC">
<td height="20" nowrap colspan="8"><font face="Arial, Helvetica, sans-serif" size="2"><b>Company
Area Name</b> <%
Response.Write( rs.Fields("company_area_name"
)
%> </font></td>
</tr>
<tr bordercolor="#999999">
<td height="17" nowrap width="33%" bgcolor="#CCCCCC"> <font face="Arial, Helvetica, sans-serif" size="2"><b>Client
Name</b> </font> </td>
<td height="17" nowrap width="33%" bgcolor="#CCCCCC"> <font face="Arial, Helvetica, sans-serif" size="2"><b>Project
Name</b> </font> </td>
<td height="17" nowrap width="33%" bgcolor="#CCCCCC"> <font face="Arial, Helvetica, sans-serif" size="2"><b>Milestone</b>
</font> </td>
</tr>
<%
do
%>
<tr>
<td height="14" nowrap width="33%" bgcolor="#FFE8E8"><font face="Arial, Helvetica, sans-serif" size="2"><%
Response.Write( rs.Fields("client_name"
)
%></font></td>
<td height="14" nowrap width="33%" bgcolor="#FFE8E8"><font face="Arial, Helvetica, sans-serif" size="2"><%
Response.Write( rs.Fields("Project"
)
%></font></td>
<td height="14" nowrap width="33%" bgcolor="#FFE8E8"><font face="Arial, Helvetica, sans-serif" size="2"><%
Response.Write( rs.Fields("milestone"
)
%></font></td>
</tr>
<%
rs.MoveNext
if rs.eof then
exit do
end if
loop until rs("project_date"
<> curDate
if rs.eof then
exit do
end if
loop until rs("company_area_id"
<> curArea
if rs.eof then
exit do
end if
loop until rs.eof
' wend
%>
</table>
I am retreiving some data from an Access database. My code is retreiving all the fields I want, however, instead of 5 dates, it is only retreiving 3 dates, so I guess I have something wrong with my loop. Hereunder I am attaching the piece of code that is giving me trouble. I appreciate a lot all the help you can give me. Thanks
<%
Case 2
titlerep = "Milestones Summary"
%>
<table width="78%" height="77" border="1" cellpadding="0" cellspacing="0">
<%
rs.MoveFirst
' while not rs.EOF
do
curDate = rs("project_date"
%>
<tr bgcolor="#CCCCFF">
<td height="23" nowrap colspan="8"> <font face="Arial, Helvetica, sans-serif" size="2"><b>Date</b>
<%
Response.Write( rs.Fields("project_date"
%> </font> </td>
</tr>
<%
do
curArea = rs("company_area_id"
%>
<tr bgcolor="#CCFFCC">
<td height="20" nowrap colspan="8"><font face="Arial, Helvetica, sans-serif" size="2"><b>Company
Area Name</b> <%
Response.Write( rs.Fields("company_area_name"
%> </font></td>
</tr>
<tr bordercolor="#999999">
<td height="17" nowrap width="33%" bgcolor="#CCCCCC"> <font face="Arial, Helvetica, sans-serif" size="2"><b>Client
Name</b> </font> </td>
<td height="17" nowrap width="33%" bgcolor="#CCCCCC"> <font face="Arial, Helvetica, sans-serif" size="2"><b>Project
Name</b> </font> </td>
<td height="17" nowrap width="33%" bgcolor="#CCCCCC"> <font face="Arial, Helvetica, sans-serif" size="2"><b>Milestone</b>
</font> </td>
</tr>
<%
do
%>
<tr>
<td height="14" nowrap width="33%" bgcolor="#FFE8E8"><font face="Arial, Helvetica, sans-serif" size="2"><%
Response.Write( rs.Fields("client_name"
%></font></td>
<td height="14" nowrap width="33%" bgcolor="#FFE8E8"><font face="Arial, Helvetica, sans-serif" size="2"><%
Response.Write( rs.Fields("Project"
%></font></td>
<td height="14" nowrap width="33%" bgcolor="#FFE8E8"><font face="Arial, Helvetica, sans-serif" size="2"><%
Response.Write( rs.Fields("milestone"
%></font></td>
</tr>
<%
rs.MoveNext
if rs.eof then
exit do
end if
loop until rs("project_date"
if rs.eof then
exit do
end if
loop until rs("company_area_id"
if rs.eof then
exit do
end if
loop until rs.eof
' wend
%>
</table>