Forums

This topic is locked

ID showing up in dynamic list/menu options

Posted 28 Feb 2003 03:49:11
1
has voted
28 Feb 2003 03:49:11 jack nimble posted:
I have an issue with my "update record" page. For some reason, any dynamic list/menu that I add, the record ID shows up as one of the options (at the bottom of the list).

For instance, the list I have below (code) has a dynamic list/menu named "priority". When I preview the page in IE and drop the menu down, I have four (4) values: Normal, Low, High & 1 (ID of pending Access 2000 record). This problem applies to other drop down lists on the page as well.

Here is code for the dynamic list/menu I'm working on (it is title "priority" and the option values are "normal", "low", & "high":

<b>&lt;select name="priority" id="priority"&gt;
&lt;option value="Normal" &lt;%If (Not isNull((rsEdit.Fields.Item("priority".Value))) Then If ("Normal" = CStr((rsEdit.Fields.Item("priority".Value))) Then Response.Write("SELECTED" : Response.Write(""%&gt;&gt;Normal&lt;/option&gt;
&lt;option value="Low" &lt;%If (Not isNull((rsEdit.Fields.Item("priority".Value))) Then If ("Low" = CStr((rsEdit.Fields.Item("priority".Value))) Then Response.Write("SELECTED" : Response.Write(""%&gt;&gt;Low&lt;/option&gt;
&lt;option value="High" &lt;%If (Not isNull((rsEdit.Fields.Item("priority".Value))) Then If ("High" = CStr((rsEdit.Fields.Item("priority".Value))) Then Response.Write("SELECTED" : Response.Write(""%&gt;&gt;High&lt;/option&gt;
&lt;%
While (NOT rsEdit.EOF)
%&gt;
&lt;option value="&lt;%=(rsEdit.Fields.Item("ID".Value)%&gt;" &lt;%If (Not isNull((rsEdit.Fields.Item("priority".Value))) Then If (CStr(rsEdit.Fields.Item("ID".Value) = CStr((rsEdit.Fields.Item("priority".Value))) Then Response.Write("SELECTED" : Response.Write(""%&gt; &gt;&lt;%=(rsEdit.Fields.Item("ID".Value)%&gt;&lt;/option&gt;
&lt;%
rsEdit.MoveNext()
Wend
If (rsEdit.CursorType &gt; 0) Then
rsEdit.MoveFirst
Else
rsEdit.Requery
End If
%&gt;
&lt;/select&gt;</b>

Reply to this topic