Results 1 to 2 of 2
  1. #1
    Join Date
    May 2002

    Unhappy Unanswered: Passing variable to Report- Access

    Hi All,

    I have a report which needs to sort registered voters in my state, the report is generated from a form with a combo box "Sort by...."
    I would like to be able to sort the report by Last Name or the Precinct the person lives in.

    The drop-down box I created in the form has "Last Name", "Township ID". So, it follows that in the Access Report, Design View, Sorting and Grouping, I have the expression [Sort by] ---> "[Forms]![FormSelectCriteria].ComboSort".

    This works about as well as a one legged duck swimming in a toilet get the idea. Any suggestions out there???

  2. #2
    Join Date
    Apr 2002
    Hi Jeff,

    Try your luck with the Report's OnOpen event with code like:

    GroupLevel(0).ControlSource = Forms![YourForm]![YourSortField]

    You can provide several layers of Grouping and Sorting with this.
    See Access Help on 'GroupLevel' for more info.

Posting Permissions

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