danomaniac
Programmer
Hello,
I've built a report in Access and am now building a form to launch it with option groups for users to set criteria. I'm having difficulty setting the OrderBy property. I want the user to select if the report is sorted either by Part Number, or by Inventory level, and either Ascending or Descending.
I've tried entering in the report's Open event,
Select Case Forms!frmName.FrameSort.Value
Case is = 1: Me.OrderBy = "InvPercent DESC"
Case is = 2: Me.OrderBy = "InvPercent ASC"
Case is = 3: Me.OrderBy = "PartNumber DESC"
Case is = 4: Me.OrderBy = "PartNumber ASC"
End Select
Should I change the sorting in the query instead of the report?
Am I putting the code in the wrong place?
Do the Header/Footer sortings and groupings override the code?
Any help would be appreciated.
"It's more like it is now, than it ever has been."
I've built a report in Access and am now building a form to launch it with option groups for users to set criteria. I'm having difficulty setting the OrderBy property. I want the user to select if the report is sorted either by Part Number, or by Inventory level, and either Ascending or Descending.
I've tried entering in the report's Open event,
Select Case Forms!frmName.FrameSort.Value
Case is = 1: Me.OrderBy = "InvPercent DESC"
Case is = 2: Me.OrderBy = "InvPercent ASC"
Case is = 3: Me.OrderBy = "PartNumber DESC"
Case is = 4: Me.OrderBy = "PartNumber ASC"
End Select
Should I change the sorting in the query instead of the report?
Am I putting the code in the wrong place?
Do the Header/Footer sortings and groupings override the code?
Any help would be appreciated.
"It's more like it is now, than it ever has been."