1. Senior Member
Join Date
Dec 1969
Posts
1,045

## Looping through a puldown menu..

2. Senior Member
Join Date
Dec 1969
Posts
111

## RE: Looping through a puldown menu..

You could loop through the months using an array and response.write each array item...<BR><BR>For example (untested)<BR><BR>For x = 0 To Month(12)<BR> Response.Write(x)<BR>Next<BR><BR>--Jason<BR>http://www.xspydr.com

3. Senior Member
Join Date
Dec 1969
Posts
449

## Something like?

&#060;select name="MonthSelected"&#062; <BR> &#060;option value = ""&#062;&#060;/option&#062; <BR> &#060;option value="ALL"&#062;All Records&#060;/option&#062; <BR>&#060;%<BR>for i = 1 to 12<BR>%&#062;&#060;option value="&#060;%=-i%&#062;"&#062;&#060;%=det_month(i)%&#062; - &#060;%=MonthName(Month(DateAdd( "m", -1, Date( ) ) ))%&#062;&#060;/option&#062; <BR>&#060;%<BR>next<BR>%&#062;<BR>&#060;/select&#062;<BR> <BR>&#060;/BODY&#062;<BR>&#060;/HTML&#062;<BR>&#060;%<BR>Function det_month(i)<BR>if i = 1 then <BR> det_month = "Last Month"<BR>Else<BR> det_month = i & " months ago"<BR>End If<BR><BR>End Function<BR>%&#062;

4. Senior Member
Join Date
Dec 1969
Posts
1,045

## Thats Perfect..

I figured out the Loop I just couldn&#039;t figure out the Function Part. I like it though. Thanks

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•