Hi Tread42,
Yes, definitely doable.
Here is an example I did for an ASP page.
I only wanted to populate the year-box with years that actually had data in the table. Why show 2000 or 2003 in the select box if there is no data in the table for those years... right? What you want to do is similar...
Good luck, john
It is written in VBscript:
<%
'Build the dropdown box entries
'Retrieve all unique year values in the LoadHist table so we can populate the YR dropdown box
sql = "SELECT DISTINCT year(DateClosed) As YearClosed FROM LoadHist ORDER BY YearClosed"
set rs = createobject("adodb.recordset"
rs.open sql,conn, adOpenStatic, adLockReadOnly, adCmdText
'Add entries to the selection box for each year we have accumulated Load history for
%>
<SELECT NAME="YR" size="1" onChange="Loads.submit()">
<option>Select a year</option>
<%
Do While NOT rs.eof
%>
<option value="<%=rs.Fields("YearClosed"

%>">
<%=rs.Fields("YearClosed"

%>
</option>
<%
rs.MoveNext()
Loop
'...end of section that builds the dropdown box
%>
</SELECT>