What I want to do is sort the first main set of array's by the entry contained in the combobox's.

With this function, I am able to sort by the first combobox, but cannot fathom how to add the logic to do all three of them at the same time.



Code:

Function Filter()
$Flag = "True"
$Count = 0
$Count2 = 0

For Each $Server In $C
If $ServSort.Text = $Server
ReDIM Preserve $D1[$Count]
ReDIM Preserve $T1[$Count]
ReDIM Preserve $E1[$Count]
ReDIM Preserve $C1[$count]
ReDIM Preserve $TE1[$Count]
ReDIM Preserve $BY1[$count]
$D1[$Count] = $D[$Count2]
$T1[$Count] = $T[$Count2]
$E1[$Count] = $E[$Count2]
$C1[$Count] = $C[$Count2]
$TE1[$Count] = $TE[$Count2]
$By1[$Count] = $BY[$Count2]
$count = $count + 1

EndIf
$Count2 = $Count2 + 1
Next
$Count = $Count + 1
Update2 ()
EndFunction




What I need to do is look at each of the three variables coming from the combobox.text and compare them to the main set of array's.

If $ServSort.Text = "None" do not compare else If $Servsort.Text = $Server then compare
And If $ReportSort.Text = "None" do not compare else if $ReportSort.Text = $BY then compare
And If $ErrorSort.Text = "None" do not compare else if $ErrorSort.Text = $E then compare

I would like to do this in a single function so that at any time they click on one of the combobox entries will do the sort based on all of the criteria found within the three combobox's.

Does this make any sense?
_________________________
Today is the tomorrow you worried about yesterday.