Results 1 to 2 of 2
  1. #1
    ACMC is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Posts
    2

    Placing a Report filter at the start-up of a report

    The company I work for has branches in multiple states and we use Access to organize all their tax requirements. We print out reports for every month, and my company would like to create a pop-up window that will let us filter the report when it starts up so that it automatically shows only the dates that we wish it to. How do I create a filter that pops-up when the report starts?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    I don't recommend popup input prompts. They are difficult if not impossible to validate the input. Have user input criteria into control on a form. Refer to the control as parameter. Options:

    1. parameterized query, review: http://datapigtechnologies.com/flash...mtoreport.html
    again, not my preferred method, I don't like to set up parameterized query objects.

    2. use WHERE CONDITION argument of DoCmd.OpenReport - this is what I usually use - in VBA code something like:
    If IsDate(Me.textboxname) Then
    DoCmd.OpenReport "report name", , , "[date fieldname]=#" & Me.textboxname & "#"
    End If
    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.

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

Similar Threads

  1. Replies: 2
    Last Post: 05-10-2013, 03:37 PM
  2. Placing a notes section in a report
    By lugnutmonkey in forum Reports
    Replies: 10
    Last Post: 03-05-2013, 11:50 AM
  3. Replies: 1
    Last Post: 06-26-2012, 08:19 PM
  4. Replies: 3
    Last Post: 04-11-2012, 01:13 PM
  5. Check Report or query at start up
    By smahdih in forum Reports
    Replies: 4
    Last Post: 11-15-2011, 12:03 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