Posts: 20
Score: 0
Joined: 5/22/2001
From: USA
Status: offline
I know it seems a bit stupid but... I wish to have two option boxes, one under the other yeah.. Accessing the info for these list boxes from a db the info is going into the one box, where i want two seperate ones.
'ere is my code.
'---------------------------------------------------------- ' execute the command, thereby populating the adoRS recordset Set adoRS = adoCmd.Execute
Do while not adoRS.EOF
dim CatStrs, ValueSubs
call GetFullSubModelsDesc (adoRS, CatStrs, ValueSubs) '--Gives year range & sub model-- Response.Write "<option value =""" & server.HtmlEncode(ValueSubs) & """>" & adoRS("YearBegin").value & " - " & adoRS("YearEnd").value & " " & CatStrs & "</option>" & vbCrLf
Response.Write "<option value =""" & server.HTMLEncode(ValueSubs) & """>" & adoRS("ModelDescription").value & "</option>" & vbCrLf adoRS.MoveNext Loop '---------------------------------------------------------- I'd be grateful for any help ;)
Posts: 11
Score: 0
Joined: 5/22/2001
From: USA
Status: offline
Instead of putting your response.writes inside of your loop, build your option tags for each listbox into string variables, one variable for each listbox. Then, when you're done with your loop, response.write each of the string variables (that now contain all the text needed to build a select element with all its options).