Gossamer Forum
Home : General : Internet Technologies :

Form select, multiple columns?

Quote Reply
Form select, multiple columns?
Let me see if this makes sense, I have a Form Select populated from a small database. I'd like the pulldown list to include two items per line. Basically it's a number followed by what the number means.

Here's my SQL as hashed out by me (no laughing, I am not a programmer)

Code:
SELECT GroupId, GroupNumber, GroupSort, ID, Group_Type
FROM heavybombers.Groups JOIN heavybombers.[Listbox-Grouptype]
ON GroupID = ID
ORDER BY GroupSort ASC
The two items I want in the pulldown list are "GroupNumber" and "Group_Type".....is this possible?

Here's my select code populated with "GroupNumber":
Code:
<select name="Group" id="Group">
<option value="value">Group</option>
<%
While (NOT rsGroup.EOF)
%>
<option value="<%=(rsGroup.Fields.Item("GroupId").Value)%>">
<%=(rsGroup.Fields.Item("GroupNumber").Value)%></option>
<%
rsGroup.MoveNext()
Wend
If (rsGroup.CursorType > 0) Then
rsGroup.MoveFirst
Else
rsGroup.Requery
End If
%>
</select>
This would usually be where I'd call my programmer and say, "HELP", but he's in the process of moving cross country.

Last edited by:

ArmyAirForces: Jun 17, 2002, 2:06 PM
Quote Reply
Re: [ArmyAirForces] Form select, multiple columns? In reply to
Intersting note, each time I edited the text within the "code" tags, it added a space to the start of the first line within the "code" tags. Bug?

Last edited by:

ArmyAirForces: Jun 17, 2002, 2:07 PM
Quote Reply
Re: [ArmyAirForces] Form select, multiple columns? In reply to
Are we dealing with ASP here?
Quote Reply
Re: [Paul] Form select, multiple columns? In reply to
Yes. Although the format of the Select really shouldn't matter, straight HTML, ASP or whatever.

Last edited by:

ArmyAirForces: Jun 17, 2002, 2:51 PM
Quote Reply
Re: [ArmyAirForces] Form select, multiple columns? In reply to
I hate having to read programming books. Crazy

But the answer goes like this:

Code:
SELECT GroupId, GroupNumber + ' ' + Group_Type as Group_Select
FROM heavybombers.Groups JOIN heavybombers.[Listbox-Grouptype]
ON GroupID = ID
ORDER BY GroupSort ASC
Instead of worrying about the Form Select format for multiple items, created the merged items in SQL.