I need this code modified. I know it works because I took it from a generated page from ASPMAKER. But I'm trying to implement it with the code from my page.
[code]
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Data Source=" & Server.Mappath("db.mdb") & ";Provider=Microsoft.Jet.OLEDB.4.0;"
sSqlWrk = "SELECT [U_DISPUTES] FROM [DISPUTES] ORDER BY [U_DISPUTES] Asc"
Set rswrk = Server.CreateObject("ADODB.Recordset")
rswrk.Open sSqlWrk, conn, 1, 2
If Not rswrk.Eof Then
datawrk = rswrk.GetRows
rowswrk = UBound(datawrk, 2)
'Dim ar_x_DISPUTES, ari_x_DISPUTES
ar_x_DISPUTES = split(DAT_DISPUTE&"",",")
For rowcntwrk = 0 To rowswrk
x_DISPUTESChk = x_DISPUTESChk & "<input type='checkbox' name='DAT_DISPUTE' value='" & datawrk(0, rowcntwrk) & "'"
For ari_x_DISPUTES = 0 to UBound(ar_x_DISPUTES)
If CStr(datawrk(0, rowcntwrk)&"") = Trim(ar_x_DISPUTES(ari_x_DISPUTES)&"") Then
x_DISPUTESChk = x_DISPUTESChk & " checked"
Exit For
End If
Next
x_DISPUTESChk = x_DISPUTESChk & ">" & datawrk(0, rowcntwrk) & EditOptionSeparator(rowcntwrk)
Next
End If
rswrk.Close
Set rswrk = Nothing
Response.Write x_DISPUTESChk
%>
[code]
But know I get this error message:
[code]
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'EditOptionSeparator'
/myweb/ducredit/includes/inc_edit.
asp, line 434
[code]
This won't display unless I take out the " & EditOptionSeparator(rowcntwrk)" portion
When I do take it out it goes back to my original problem
displayed checkboxes on my edit page without repopulating the previous choses.
Does anyone know what this "EditOptionSeparator" is and can it be change to something else so that it works.
Can the code be simplified so you no longer need the "EditOptionSeparator" portion?
Can anyone help!??