Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exclude a FieldItem from Recordset

Status
Not open for further replies.

jon24422531

Technical User
Jan 27, 2004
295
GB
Hi guys

I am trying to exclude a field from a table that is generated from a SQL recordset, however I wish to use the field items in the table as a "title". I have worked how to show (D) in the "title" bit, but I don't want the field (D) to appear in the table

So I have a recordset with fields A, B, C, D
Code:
<table class="sortable">
<tr>
<%
 for each fieldItem in rsData.fields
  Response.Write vbTab & vbTab &"<td bgcolor=""#EBDDE2"" title=""Click to Sort""><strong>" & fieldItem.name
  Response.Write "</strong></td>" & vbCrLf
 next
  Response.Write vbTab & "</tr>" & vbCrLf
%>
</tr>
<%

Do While not rsData.EOF
 Response.Write "<tr>"
 for each fieldItem in rsData.fields
  if fieldItem.name = "A" then
 Response.Write "<td>&nbsp;<a href=""WorkLogOpenDetail.asp?id=" & fieldItem.Value & """ title=" & rsData.fields.item("D").Value & """>" & fieldItem.value & "</a></td>"
  else
 Response.Write "<td><small>&nbsp;" & fieldItem.value & "</small></td>"
  end if
 next
 Response.Write "</tr>"
 rsData.MoveNext
Loop
%>
</table>
<%end if%>

Many thanks

Jonathan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top