Select Statement help please...
Posted on 2006-10-22
OK - I am not an HTML programmer - I am a VB Programmer and I understand HTML and this is our first venture into ASP with HTML - and I'm stuck.
We have designed a web site for a heavy plant machinery customer where by they can advertise for sale pieces of plant.
The web site, which we have adopted from another web site allows the user to upload a photo and add description price etc etc.
The problem is when they come to edit an entry. We have added a select statement that allows them to choose from a specific list of equipment type and for a new entry this works fine, but when they edit the item the same select list is used but it defaults to the first item in the select list.
What we require is the field to display the current selection that has been saved in the access database - with also the ability to use the drop down list and select a different model type if required.
Our standard field code looks like this:
<input name="Price" size="40" value="<%=rs("Price")%>"></font></td> - "Price" being the stored value from the database.
Our Select Statement looks like this:
<select name="Type" size="1" value="<%=rs("Type")%>">
<option VALUE="Skid Steel Loaders">SkidSteelLoaders
<option VALUE="Telescopic Handlers/Forklifts">Telescopic Handlers/Forklifts
However the above code section - value="<%=rs("Type")%>"> does not display the stored database value - instead is SHOWS (But has not been stored yet) the first int he select list - "BackHoe/Loaders"
Could anyone provide me with the actual code I need.