Here is what finally worked for me. Turned out that it was a problem with my not Dimming some variables.
Live and learn
Code:
Function Filter()
DIM $d1, $t1, $e1, $c1, $te1, $by1
DIM $d2, $t2, $e2, $c2, $te2, $by2
$ProgressBar.Visible = "True"
$ProgressBar.Value = 0
$Label15.Text = "Filtering"
$Flag = "True"
$Count = 0
For $count2 = 0 To UBound($c)
If $ProgressBar.Value => 100 $ProgressBar.Value = 0 EndIf
$ProgressBar.PerformStep()
$iIncludeThis=0
$Comp = $C[$count2]
If $ServSort.Text = "None" OR $ServSort.Text = $Comp $iIncludeThis=1 EndIf
If $iIncludeThis = 1
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
Next
$Count = 0
For $count2 = 0 To UBound($C1)
If $ProgressBar.Value => 100 $ProgressBar.Value = 0 EndIf
$ProgressBar.PerformStep()
$iIncludeThis=0
$Rep = $BY1[$count2]
If $ReportSort.Text = "None" OR $ReportSort.Text = $Rep $iIncludeThis=1 EndIf
If $iIncludeThis = 1
ReDIM Preserve $D2[$Count]
ReDIM Preserve $T2[$Count]
ReDIM Preserve $E2[$Count]
ReDIM Preserve $C2[$count]
ReDIM Preserve $TE2[$Count]
ReDIM Preserve $BY2[$count]
$D2[$Count] = $D1[$Count2]
$T2[$Count] = $T1[$Count2]
$E2[$Count] = $E1[$Count2]
$C2[$Count] = $C1[$Count2]
$TE2[$Count] = $TE1[$Count2]
$By2[$Count] = $BY1[$Count2]
$count = $count + 1
EndIf
Next
$Count = 0
For $count2 = 0 To UBound($C2)
If $ProgressBar.Value => 100 $ProgressBar.Value = 0 EndIf
$ProgressBar.PerformStep()
$iIncludeThis=0
$Err = $E2[$Count2]
If $ErrorSort.Text = "None" OR $ErrorSort.Text = $ERR $iIncludeThis=1 EndIf
If $iIncludeThis = 1
ReDIM Preserve $D3[$Count]
ReDIM Preserve $T3[$Count]
ReDIM Preserve $E3[$Count]
ReDIM Preserve $C3[$count]
ReDIM Preserve $TE3[$Count]
ReDIM Preserve $BY3[$count]
$D3[$Count] = $D2[$Count2]
$T3[$Count] = $T2[$Count2]
$E3[$Count] = $E2[$Count2]
$C3[$Count] = $C2[$Count2]
$TE3[$Count] = $TE2[$Count2]
$By3[$Count] = $BY2[$Count2]
$count = $count + 1
EndIf
Next
$Count = 0
Update2 ()
$ProgressBar.Visible = "False"
$Label15.Text = "Filter Criteria"
EndFunction
_________________________
Today is the tomorrow you worried about yesterday.