No, resizing won't do anything. The combo box (actually, it is called a
"dropdown", or, better yet, a "select" - there is no such combo box in
html) is displaying exactly what the html is telling it to display.
Look at one of the option tags:
<option value='A Sweet Song'>Laser</option>
It sounds as if you are expecting the content of the value attribute ("A
Sweet Song") to be displayed as well as the option tag's text ("Laser" -
the portion between the opening and closing tags). Sorry, it just does
not work that way. The dropdown will display whatever is in the text,
and only what is in the text. So you need to modify your code to make
the resulting html look the way you want it to look, probably via
concatenation. Start with straight html. Write small .htm a page
containing hard-coded html that gives you what you want. Then go back to
your code and modify it so that it results in the same html.
[quoted text, click to view] Jack wrote:
> Bob,
> In my combo box, I am seeing only one field with the output as
> Laser
> Laser
> Laser
> Laser
> Soling
> Soling
> Soling
> Soling
> Soling
> Soling
> Flying Scot
> Flying Scot
> Flying Scot
> That's the problem I have. Do you think the size of the combo box
> needs to be widened to accommodate the first field or what? Thanks.
>
> "Bob Barrows [MVP]" wrote:
>
>> If the data in Boats looks like this:
>> A Sweet Song | Laser
>> Blackbeard | Laser
>> No Excuse to Lose | Laser
>> No Excuse Two Lose | Laser
>> White Lightning | Soling
>> Teal | Soling
>> TGV | Soling
>> BB3 | Soling
>> Nuts and Bolts | Soling
>> Psycho | Soling
>> Shasta | Flying Scot
>> Daphne | Flying Scot
>> Red White and Blue | Flying Scot
>>
>> Then that is the output I would expect from your code
>>
>> What is wrong with it? What do you want it to look like?
>>
>> Jack wrote:
>>> Bob,
>>> Here is the output in html. Thanks
>>> OUTPUT:
>>>
>>> <html>
>>> <head>
>>> <title>Populating two fields in combo box from a query</title>
>>> </head>
>>>
>>> <body>
>>> <h2>
>>> Populating two fields in combo box from a query</h2>
>>>
>>> SELECT BoatName, BoatClass FROM Boats;<br>A Sweet Song<br>Laser<br>
>>> <select name="lstBoats" size="1">
>>> <option value='A Sweet Song'>Laser</option><option
>>> value='Blackbeard'>Laser</option><option value='No Excuse to
>>> Lose'>Laser</option><option value='No Excuse Two
>>> Lose'>Laser</option><option value='White
>>> Lightning'>Soling</option><option
>>> value='Teal'>Soling</option><option
>>> value='TGV'>Soling</option><option
>>> value='BB3'>Soling</option><option value='Nuts and
>>> Bolts'>Soling</option><option value='Psycho'>Soling</option><option
>>> value='Shasta'>Flying Scot</option><option value='Daphne'>Flying
>>> Scot</option><option value='Red White and Blue'>Flying
>>> Scot</option> </select>
>>>
>>> </body>
>>> </html>
>>>
>>
>> --
>> Microsoft MVP -- ASP/ASP.NET
>> Please reply to the newsgroup. The email account listed in my From
>> header is my spam trap, so I don't check it very often. You will get
>> a quicker response by posting to the newsgroup.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.