Drop-downs

L

LC

Hi All,

I would like to descrease the height or size of the drop-
down such that it displays 10 items at a time instead of
like 20 items.

Here is the code I have for the drop-down:
strSQL3 = "SELECT DISTINCT tblEV3Location.Code FROM
tblEV3Location ORDER BY tblEV3Location.Code;"

<% set cars3=adoCon.execute(strSQL3) %>
<select name="Code">
<% 'Loop through the recordset to make each entry
in the list. %>
<% do while not cars3.eof %>
<Option value = "<%= cars3(0) %>"> <%=
cars3(0) %></Option>
<%cars3.movenext
loop%>
</select>

Thanks.
 
J

Jim Buyens

Howdy.

<%
cnt = 0
do until cars3.eof or (cnt > 9)
%>
<Option value="<%=cars3(0)%>"><%=cars3(0)%></Option>
<%
cars3.movenext
cnt = cnt + 1
loop
%>

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
J

Jens Peter Karlsen[FP-MVP]

Set size=10 in your select, then it will display the first 10 entries
and you will need to scroll for the rest.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: LC [mailto:[email protected]]
Posted At: 29. juli 2004 18:36
Posted To: microsoft.public.frontpage.programming
Conversation: Drop-downs
Subject: Drop-downs


Hi All,

I would like to descrease the height or size of the drop- down such that
it displays 10 items at a time instead of like 20 items.

Here is the code I have for the drop-down:
strSQL3 = "SELECT DISTINCT tblEV3Location.Code FROM tblEV3Location ORDER
BY tblEV3Location.Code;"

<% set cars3=adoCon.execute(strSQL3) %>
<select name="Code">
<% 'Loop through the recordset to make each entry in the list.
%>
<% do while not cars3.eof %>
<Option value = "<%= cars3(0) %>"> <%=
cars3(0) %></Option>
<%cars3.movenext
loop%>
</select>

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top