Forum Moderators: open

Message Too Old, No Replies

Putting 2 fields into one list box

help

         

Andrew Thomas

10:27 am on Dec 11, 2002 (gmt 0)

10+ Year Member



Im am trying to insert 2 field names into one option/list box, but i am having problems. Could someone help me out please.

So far i have one list box being populated by one field, but i need two fields?

<option value="<%=(rs_processor.Fields.Item("component_description").Value)%>"><%=(rs_processor.Fields.Item("component_description").Value)%></option>

the other field name is "component_price"

thanks

Crazy_Fool

10:52 am on Dec 11, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



is this what you're trying to do?

<option value="<%=(rs_processor.Fields.Item("component_description").Value)%><%=(rs_processor.Fields.Item("component_price").Value)%>"><%=(rs_processor.Fields.Item("component_description").Value)%> <%=(rs_processor.Fields.Item("component_price").Value)%></option>

Andrew Thomas

10:58 am on Dec 11, 2002 (gmt 0)

10+ Year Member



Thanks crazy_fool

that done the trick :)

Andy

Andrew Thomas

1:13 pm on Dec 12, 2002 (gmt 0)

10+ Year Member



Same topic, different problem?

Code :

<option value="<%=(rs_processor.Fields.Item("component_description").Value)%><%=(rs_processor.Fields.Item("component_price").Value)%>"><%=(rs_processor.Fields.Item("component_description").Value)%>£<%=(rs_processor.Fields.Item("component_price").Value)%></option>

how do i get a tab space between the description and price

eg

20Gb Hard Disk £15.00

within the list box?

thanks

RossWal

7:23 pm on Dec 12, 2002 (gmt 0)

10+ Year Member



try instead of: <%=databasefield1%><%=databasefield2%> do this: <%=databasefield1 & " " & databasefield2%>