I've checked in various places and can't find a reference to this, so I thought I'd post.

Is there a way to create a 'control array' of sorts on a form so that you don't have to "retype" all the code to create the input box?

Specifically, I have a listbox on my form that queries our database for values to populate the listbox, as follows:

Select a Status:
<select NAME="Status" SIZE="1">
<%objRS.MoveFirst
While not objRS.EOF%>
<option value="<%=objRS("Value")%>"><%=objRS("Value")% ></option>
<%objRS.MoveNext
wend
objRS.close
%>
</select>

This works fine to show one listbox on my form - however, I need to have a specific # (let's say 5) of listboxes that all have the same values from the recordset.

Is there a way to make something like this an array instead of having to repeat this entire thing for each listbox?

I'm quite new at this, so any help is much appreciated!! Thanks!