danblack30
MIS
I'm using this code from Sheco for the array.
<%
myvalues=Split(Recordset1.Fields.Item("Resolved_by").Value, ",")
For i = LBound(myvalues) TO UBound(myvalues)
Response.Write myvalues(i)
Next
%>
Using (Response.Write myvalues(i)) temporarily for debugging.
Here's the menu code.
<select name="Resolved_by" size="4" multiple="multiple" id="Resolved_by">
<%
While (NOT Recordset2.EOF)
%>
%>
<option value="<%=(Recordset2.Fields.Item("Username").Value)%>"
<%If (Not isNull(myvalues)) Then If (CStr(Recordset2.Fields.Item("Username").Value) = CStr(myvalues))
Then Response.Write("SELECTED") : Response.Write("")%>><%=(Recordset2.Fields.Item("Username").Value)%>
</option>
<%
Recordset2.MoveNext()
Wend
If (Recordset2.CursorType > 0) Then
Recordset2.MoveFirst
Else
Recordset2.Requery
End If
%>
I get the error (Type Mismatch 'CStr'), and I checked the value for recordset2 and "myvalues" which is dan.
Any Ideas?
Dan
<%
myvalues=Split(Recordset1.Fields.Item("Resolved_by").Value, ",")
For i = LBound(myvalues) TO UBound(myvalues)
Response.Write myvalues(i)
Next
%>
Using (Response.Write myvalues(i)) temporarily for debugging.
Here's the menu code.
<select name="Resolved_by" size="4" multiple="multiple" id="Resolved_by">
<%
While (NOT Recordset2.EOF)
%>
%>
<option value="<%=(Recordset2.Fields.Item("Username").Value)%>"
<%If (Not isNull(myvalues)) Then If (CStr(Recordset2.Fields.Item("Username").Value) = CStr(myvalues))
Then Response.Write("SELECTED") : Response.Write("")%>><%=(Recordset2.Fields.Item("Username").Value)%>
</option>
<%
Recordset2.MoveNext()
Wend
If (Recordset2.CursorType > 0) Then
Recordset2.MoveFirst
Else
Recordset2.Requery
End If
%>
I get the error (Type Mismatch 'CStr'), and I checked the value for recordset2 and "myvalues" which is dan.
Any Ideas?
Dan