Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6136313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:35:17+00:00 2026-05-23T17:35:17+00:00

I have an access report which fetches data from an underlying access query. The

  • 0

I have an access report which fetches data from an underlying access query. The problem I am having is that I want to be able to allow the user the ability to sort the data based on 3 separate fields. How can I give the user this facility that he can choose if he wants to sort the incoming data based on a field A, B or C?

Kindly help.
Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T17:35:17+00:00Added an answer on May 23, 2026 at 5:35 pm

    The following should help.

    First, use openArgs parameter to pass user’s selected OrderBy field:

    DoCmd.Close acReport, "MyReport"
    DoCmd.OpenReport "MyReport", acViewPreview, , , , "OrderByColumnName"
    

    Then, use passed value for ordering on report Load:

    For Access 2007+:

    Private Sub Report_Load()
        Me.Report.OrderByOn = True
        Me.Report.OrderBy = Me.Report.OpenArgs
    End Sub
    

    For Access 2003:

    Private Sub Report_Open(Cancel As Integer)
        Me.Report.OrderByOn = True
        Me.Report.OrderBy = Me.Report.OpenArgs
    End Sub
    

    The outcome is the same: report will be [re]sorted based on the passed parameters.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a report in MS Access where the underlying data in the tables
I have an Access Database that outputs a report in Excel format. The report
I have an access 2007 Database that outputs a report in excel format, the
I have a report to which I have execute-only access - I don't have
I have an Access 2003 project in which all data is stored in SQL
I have this Access database that we use to run reports. The report is
I have a access 2007 report for which one of the fields returns a
I have an access report which contains information about a given job. I'm trying
I have a number of functions that parse data from files, usually returning a
A simple problem. I have an ASHX handler which generates a report. Unfortunately, this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.