D
doyle60
I'm using the Code below to Sort a report with a form's controls. It
works except for the fact that the header repeats for GroupLevel(3)
when GroupLevel(1) changes. What should happen is GroupLevel(3)
should not repeat itself. That is, I am seeing:
Bloomingdales [GroupLevel(0)]
Daywear [GroupLevel(3)]
Bras [GroupLevel(1)]
Style1
Style2
Style3
Daywear [GroupLevel(3)] (I DON"T WANT THIS
REPEATED)
Briefs [GroupLevel(1)]
Style1
Style2
Style3
(The issue has nothing to do with the weird order of (0), (3), and (1)
and my Sort1, Sort2, Sort3 controls.)
Here is the code:
__________________________________________________________
Dim Dlg As Form
Set Dlg = Forms!OTSTranfrm
With Me
.GroupLevel(0).ControlSource = Dlg!Sort1
.GroupLevel(0).SortOrder = False
Sort1txt.ControlSource = Dlg!Sort1
.GroupLevel(3).ControlSource = Dlg!Sort2
.GroupLevel(3).SortOrder = False
Sort2txt.ControlSource = Dlg!Sort2
.GroupLevel(1).ControlSource = Dlg!Sort3
.GroupLevel(1).SortOrder = False
Sort3txt.ControlSource = Dlg!Sort3
End With
___________________________________________
Matt
works except for the fact that the header repeats for GroupLevel(3)
when GroupLevel(1) changes. What should happen is GroupLevel(3)
should not repeat itself. That is, I am seeing:
Bloomingdales [GroupLevel(0)]
Daywear [GroupLevel(3)]
Bras [GroupLevel(1)]
Style1
Style2
Style3
Daywear [GroupLevel(3)] (I DON"T WANT THIS
REPEATED)
Briefs [GroupLevel(1)]
Style1
Style2
Style3
(The issue has nothing to do with the weird order of (0), (3), and (1)
and my Sort1, Sort2, Sort3 controls.)
Here is the code:
__________________________________________________________
Dim Dlg As Form
Set Dlg = Forms!OTSTranfrm
With Me
.GroupLevel(0).ControlSource = Dlg!Sort1
.GroupLevel(0).SortOrder = False
Sort1txt.ControlSource = Dlg!Sort1
.GroupLevel(3).ControlSource = Dlg!Sort2
.GroupLevel(3).SortOrder = False
Sort2txt.ControlSource = Dlg!Sort2
.GroupLevel(1).ControlSource = Dlg!Sort3
.GroupLevel(1).SortOrder = False
Sort3txt.ControlSource = Dlg!Sort3
End With
___________________________________________
Matt