Hello I have a VBScript function to fill a table with records and fields from a database. The problem I am having is that I can’t find a way to fill my table with check boxes. I want the name of the check box to equal the name of the corresponding record out of the database. Any help would be appreciated. Thank you.
The code I have looks like this:
<%
Function RecToTable (objRS)
Dim strT
Dim fldF
strT = "<TABLE BORDER=1><TR ALIGN=CENTER>"
For Each fldF In objRS.Fields
strT = strT & "<TD>" & fldF.Name & "</TD>"
Next
strT = strT & "</TR>"
While Not objRS.EOF
strT = strT & "<TR ALIGN=CENTER>"
For Each fldF In objRS.Fields
strT = strT & "<TD>" & fldF.Value & "</TD>"
Next
strT = strT & "</TR>"
objRS.MoveNext
Wend
strT = strT & "</TABLE>"
RecToTable = strT
End Function
%>
The code I have looks like this:
<%
Function RecToTable (objRS)
Dim strT
Dim fldF
strT = "<TABLE BORDER=1><TR ALIGN=CENTER>"
For Each fldF In objRS.Fields
strT = strT & "<TD>" & fldF.Name & "</TD>"
Next
strT = strT & "</TR>"
While Not objRS.EOF
strT = strT & "<TR ALIGN=CENTER>"
For Each fldF In objRS.Fields
strT = strT & "<TD>" & fldF.Value & "</TD>"
Next
strT = strT & "</TR>"
objRS.MoveNext
Wend
strT = strT & "</TABLE>"
RecToTable = strT
End Function
%>