Results 1 to 5 of 5
  1. #1
    vector39 is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    May 2017
    Posts
    76

    Filter reports using combo boxes and date range

    Hi everyone



    I need a little guidance about how to filter a report using a form that has two combo boxes as well as a date range. Basically the user is already on a main form (frmMain) and a button is present if the user wishes to view the info as a report, when the user clicks on this button, a form called frmReport will open prompting them to fill out the criteria which ideally will open the report. I've been fiddling around with this and made a form with a combo box and two text boxes as set to "Short Date" and a query that selects all the appropriate data as well as a report that will display everything. My issue is just filtering what the user selects and making the report appear. I've tried looking at a couple public resources but unfortunately I don't know how to make the form open directly. When it comes to reports and access in general i'm still very new. If anyone has a link to any reliable resources or advice, that would be much appreciated.

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    I wouldn't do it by filter, I'd just make the background query of the report use criteria pulling information from the form

    Example. Assume the form you are using to fill out your start/end date is named frmReportSetup
    Assume the field holding the start date is named StartDate
    Assume the field holding the end date is named EndDate

    in the criteria of your query driving the report on the date in question enter the criteria

    between [forms]![frmReportSetup]![StartDate] and [forms]![frmReportSetup]![EndDate]

  3. #3
    vector39 is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    May 2017
    Posts
    76
    Hi rpreare

    I think I know what you mean. For the frmReportSetup, do you also recommend setting it's record source to the appropriate query? Just to link the combo boxes with the query in the columns?

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    The report setup form shouldn't need a record source if you're just using it to pass variables to the query driving your report. You'd only need combo boxes/list boxes if you want to use them to refine your search/reporting criteria.

  5. #5
    vector39 is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    May 2017
    Posts
    76
    Thank you!

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

Similar Threads

  1. Replies: 4
    Last Post: 11-20-2018, 11:57 PM
  2. Replies: 3
    Last Post: 09-28-2015, 08:17 PM
  3. Replies: 21
    Last Post: 04-29-2015, 11:57 PM
  4. Filter Reports Using Combo Boxes on Pop-Up Form
    By besuchanko in forum Reports
    Replies: 12
    Last Post: 02-18-2013, 04:20 PM
  5. Filter Report by Optional Date Range and Combo Box
    By ARickert in forum SQL Server
    Replies: 3
    Last Post: 10-17-2012, 10:46 AM

Tags for this Thread

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