Results 1 to 4 of 4
  1. #1
    alsoto is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2009
    Posts
    67

    Can I pass "sort by" using DoCmd.OpenReport

    I have 7 different reports (slightly different layouts) all based on a simple select query. Client wants the ability to sort all 7 reports 4 different ways.



    I am setting up a print menu with 2 option boxes:

    Option Box "Choose Report": Report 1, Report 2, Report 3, ... Report 7
    Option Box "Choose Sort By": Sort 1, Sort 2, Sort 3, Sort 4

    Can I use DoCmd.OpenReport and pass the sort value so I can use the same exact select query for all 28 reports?

    I also need to add a date range option for each report.
    Last edited by alsoto; 04-15-2009 at 04:09 PM. Reason: misspelling

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Reports accept the OpenArgs argument.

  3. #3
    alsoto is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2009
    Posts
    67
    Thank you very much

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Post back here if you need additional assistance.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 7
    Last Post: 12-10-2018, 05:24 PM
  2. aSTR = Dir("C:\*.*") >> "Type Mismatch"
    By JGrant in forum Programming
    Replies: 1
    Last Post: 03-28-2009, 05:17 AM
  3. Replies: 0
    Last Post: 03-26-2007, 02:12 AM
  4. Replies: 2
    Last Post: 08-31-2006, 12:19 PM
  5. "Count" and "Countif" in Reports
    By JMantei in forum Reports
    Replies: 1
    Last Post: 06-20-2006, 02:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums