Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003

    Unanswered: Adding a button to a Rpt to change sort order?

    I have a rpt that Groups my detail section and then sorts on expTotal, Can i add a btn on the form to change the sort order (toggle) between Employee name and ExpTotal??


  2. #2
    Join Date
    Jul 2003
    Earth | North America | United States | California | Long Beach
    The way that I have implemented this is with a form that serves as a report request form.

    One of the parameters on the form is the sort order of the report. I happened to utilize a combo box (so that I could add additional sort selections later, if needed) but it could be done with a button.

    If you are asking to change the sort order while viewing the report...that is above my head. I am not sure how you would do that.


  3. #3
    Join Date
    Oct 2003
    Provided Answers: 1
    Hello there.
    try to make a comboBox on your form having the diffrent sort order, then on your Report_Open event make a SELECT statement including all possiblites of te ComboBox.
    Also don't forget to enable the OrderBy of the Report
    i.e Me.OrderByOn = True

    Select Case Forms!CoboBoxName.ListIndex
    Case 0
    Me.OrderBy = "[TableName]![anyFieldInTable],
    Case 1

    Case 2

    Case 3

    Case Else
    End Select

    Hope it functions, let me know
    Good Luck

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts