Results 1 to 4 of 4
  1. #1
    BSJoJaMAx4's Avatar
    BSJoJaMAx4 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2015
    Posts
    48

    Give user ability to select different time frames on a report

    I want to give the user the ability to run a report but display records based on different user defined time frames.



    So when I run the report it allows (on the Enter Parameter Value prompt) user to enter 30, 45 60 etc (to represent days). The report then looks at all records with a start date in the next x days based on what user enters

    For a separate report, I want to be able to run the same report but give user (based on drop down) ability to view all reports or only those from today's date only.

    Are both possible? If you need additional clarification please let me know.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I NEVER use dynamic parameterized queries. I prefer VBA to build filter criteria. Review: http://www.allenbrowne.com/ser-62.html

    Have unbound controls on a form for user input of parameters. Use code to construct filter criteria and apply to report when it opens

    DoCmd.OpenReport "report name", , , strCriteria

    What do you mean by 'all' reports - there is only one report object. If you want to see the report output that would have been generated two weeks ago, need to apply filter to the report so it only retrieves records from prior to that date.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    put a box on a form, user fills in txtDays
    then the query reads it
    select * from table where [days] = forms!frmRpts!txtDays

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

Similar Threads

  1. Replies: 4
    Last Post: 04-02-2014, 08:51 AM
  2. Replies: 1
    Last Post: 10-23-2013, 05:17 PM
  3. Replies: 1
    Last Post: 09-21-2013, 10:42 PM
  4. Replies: 4
    Last Post: 12-19-2011, 12:16 PM
  5. Replies: 3
    Last Post: 10-13-2011, 08:40 AM

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