adjust to simple grouping operation

This commit is contained in:
Paul Trowbridge 2022-05-12 17:40:49 -04:00
parent b1a4d149d3
commit 8034d1859f

View File

@ -72,13 +72,14 @@ Public Function TBLp_Aggregate(ByRef tbl() As String, ByRef needsort As Boolean,
End Function
Public Function TBLp_Group(ByRef tbl() As String, ByRef headers As Boolean, ParamArray cols()) As String()
Public Function TBLp_Group(ByRef tbl() As String, ByRef headers As Boolean, ByRef cols() As Integer) As String()
On Error GoTo errh
Dim i As Long 'indexes primary row
Dim j As Long 'indexes secondary chaecker row
Dim k As Integer 'used to start at 0 or 1
Dim m As Long 'used to aggregate on sequencing lines (i and j aggregate to m line) then shorten array to m length - 1
k = 0
If headers Then k = 1
@ -90,8 +91,8 @@ On Error GoTo errh
j = i + 1
Do
If j > UBound(tbl, 2) Then Exit Do
If ROWe_MatchesFlag(tbl, i, j, gflds) Then
Call ROWp_Aggregate2Rows(tbl, i, j, sflds)
If ROWe_MatchesFlag(tbl, i, j, cols) Then
'Call ROWp_Aggregate2Rows(tbl, i, j, sflds)
Else
Exit Do
End If
@ -110,12 +111,9 @@ On Error GoTo errh
errh:
If Err.Number <> 0 Then
Me.ADOo_errstring = Err.Description
TBLp_Roll = False
Exit Function
End If
TBLp_Roll = True
End Function