I get duplicate values when recalling a record back to edit it (say from "tbl_A". The combo box shows duplicate values for both the associated record from "tbl_A" and the combos initial source values from say table "tbl_B" database.
For example: tbl_A contain client account records and tbl_B is a table that contain's possible account status's (like Open, Closed, Froze, Etc..)
When I pull up a record to edit it the combo shows what the current saved value was (for example "Closed"), but the combo also show all the possibilities from tbl_B.
Combo in a new state
Combo box: [-- Assign Catagory --]
Combo in a close state (with associated saved record)
Combo box: [Closed]
Combo in an open state
Combo box: [Closed]
[Open ]
[Closed]
[Froze ]
I hope that my crude ASCII representation of a combo box helped in explaining my problem.
Thanks is advance for your time.
For example: tbl_A contain client account records and tbl_B is a table that contain's possible account status's (like Open, Closed, Froze, Etc..)
When I pull up a record to edit it the combo shows what the current saved value was (for example "Closed"), but the combo also show all the possibilities from tbl_B.
Combo in a new state
Combo box: [-- Assign Catagory --]
Combo in a close state (with associated saved record)
Combo box: [Closed]
Combo in an open state
Combo box: [Closed]
[Open ]
[Closed]
[Froze ]
Code:
sqlCat = "SELECT * FROM tblCategory;"
rsCat.Open sqlCat, adoCon
sql = "SELECT * FROM tblCategory;"
rs.Open sql, adoCon
<select>
<option selected value="">-- Assign Catagory --
<% If rsCat.RecordCount > 0 Then
%>
<option selected value="<%=rsCat("CID")%>">
<%=rsCat("txt_Cat_Title")%>
</option>
<% Do While Not rsCat.EOF %>
<option value="<%=rsCat("CID")%>">
<%=rsCat("txt_Cat_Title")%>
</option>
<% rsCat.MoveNext
Loop
End If
%>
</select>
I hope that my crude ASCII representation of a combo box helped in explaining my problem.
Thanks is advance for your time.