View Full Version : Grouping by more than one field


Henley12
06-03-2009, 12:33 PM
I have a form that has a combo box of fields to choose for grouping a report. The users want to be able to group by more than one field at a time. Is this possible? Here is my grouping logic attached to the run button:

If lstGroupBy.ItemsSelected.Count > 0 Then
strIDs = ";"
For lngLoop = 0 To lstGroupBy.ItemsSelected.Count - 1
strIDs = strIDs & lstGroupBy.ItemData(lstGroupBy.ItemsSelected(lngLo op)) & ";"
Next lngLoop
txtString = strIDs
Else
txtString = ""
End If

Henley12
06-18-2009, 06:19 AM
Any ideas on this one?