need help

1. Dan
Senior Member
Join Date
Dec 1969
Posts
1,364

## need help

i have the code.....<BR><BR>&#060;select NAME="ACCIDENT" multiple size="5"&#062;<BR>&#060;%<BR>aACCIDENT = Application("aACCIDENT")<BR>x = UBOUND(aACCIDENT, 2)<BR>If x &#062; 0 Then<BR> FOR i = 2 to x<BR> IF Trim(ACCIDENT) = Trim(aACCIDENT(1, i)) Then<BR>%&#062; &#060;option VALUE="&#060;%=aACCIDENT(1, i)%&#062;" SELECTED&#062;&#060;%=aACCIDENT(2, i) %&#062;&#060;/option&#062;<BR>&#060;% ELSE<BR>%&#062; &#060;option VALUE="&#060;%=aACCIDENT(1, i)%&#062;"&#062;&#060;%=aACCIDENT(2, i) %&#062;&#060;/option&#062;<BR>&#060;% END IF<BR> NEXT<BR>End If<BR>%&#062;<BR>&#060;/select&#062;<BR><BR>the array has a couple hundred elements. i have to have 13 specific pre-selected elements. how would i do that?

2. Akhiesh Guest

## RE: need help

are these 13 specific pre-selected elements in the array?<BR><BR>how would you be able to identity this and WHERE should you "have" them??<BR><BR>need more info.<BR><BR>

3. Dan
Senior Member
Join Date
Dec 1969
Posts
1,364

## RE: need help

my b. the array has 263 elements. The values for each are pulled from a table with 2 columns, ID & Desc. The Thirteen i need have the id&#039;s of 23, 63, 65, 67, 70, 89, 91, 93, 96, 105, 155, 179, 202

4. Senior Member
Join Date
Dec 1969
Location
Los Angeles, CA
Posts
21,192

## ok

then loop through the array and save these values into another array.<BR><BR><BR>While you are looping check for each value. If the value is = to the ones you wnat then save into another array...kinda easy....i think...

5. Dan
Senior Member
Join Date
Dec 1969
Posts
1,364

## however

this is true, and thats a good call. now that i have my &#039;new&#039; array. how do i have them preselected onload. i&#039;d want the new array elements selected/highlighted out of the original select box list(O.G. Array)

#### Posting Permissions

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