Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get a value of selected item from the list?

Status
Not open for further replies.

EKC

Technical User
Jan 13, 2001
43
0
0
CA
I have a form with some input elements and 2 list.One list display list of codes I need to display brief explanation based on selected choice.My list is :
<select name=&quot;Code&quot;>
<option>KTOL
<option>POUF
<option>YUH
<option>TRAM
<option>DTM
<option>OTHER
</select>
I have OnChange event coded of this list :
Sub Code_OnChange()
Dim CodeEX
CodeEX = Document.Entry.ProblemCode.Value
where Entry is form name
Problem is that CodeEX is empty.

Another list I have is populated from table and I can get selected value from this list.
What I am doing wrong?
Thanks
 
change the select to the following and your code will work

<select name=&quot;Code&quot; >
<option value=&quot;KTOL&quot;>KTOL
<option value=&quot;POUF&quot;>POUF
<option value=&quot;YUH&quot;>YUH
<option value=&quot;TRAM&quot;>TRAM
<option value=&quot;DTM&quot;>DTM
<option value=&quot;OTHER&quot;>OTHER
</select>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top