Results 1 to 9 of 9
  1. #1
    George is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    295

    Filtering in a report

    Good Afternoon,



    In my report there is a field with a number of numerical value. I want the report to show those numbers that are more than 2 only. Can you help me how this can be done?


    Thank you

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    You could use this method:

    http://www.baldyweb.com/wherecondition.htm

    and either hard-code the 2 or refer to a form so the user can choose.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    George is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    295
    My concern may have been missed understood. Here is it again: I have a field called "Course" and another "Number" representing the number of students registered for the various courses. I want the report to exclude courses which are undersubscribed i.e. below 5 students.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    And my suggestion didn't work? OpenReport with a wherecondition of "Number > 4".
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    George is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    295
    Your example speaks to a field name and a control name; however since it is a calculated control, which is summing, it does not have a field name only a control name. The expression in this control is "count(*)" which counts the number of students registered for various courses listed in the course field.

    Additionally, can this task be done through a macro instead?

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    I was thrown off by:

    Quote Originally Posted by George View Post
    I have a field called "Course" and another "Number"
    If you can move the calculation to the report's source query, that would give you a field to use. If not, you can probably use code in the appropriate section(s) of the report's format event to make them visible or not based on the count. If you can post the db, it may help.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    George is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    295
    Unfortunately the file is to large to upload, also my report is based on the table, there is no query. Can this task be done through a macro?

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    It's possible, but as I don't use macros I'm not sure; sorry.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    George is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    295
    ok thank you

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

Similar Threads

  1. Report Filtering
    By rhubarb in forum Reports
    Replies: 4
    Last Post: 10-14-2011, 04:18 PM
  2. Filtering a report
    By tarhim47 in forum Reports
    Replies: 12
    Last Post: 07-06-2011, 09:41 AM
  3. Report filtering
    By banjo1t in forum Reports
    Replies: 4
    Last Post: 01-26-2011, 06:43 AM
  4. Report Filtering..
    By banjo1t in forum Reports
    Replies: 1
    Last Post: 01-24-2011, 06:56 AM
  5. Report Filtering
    By HM1 in forum Reports
    Replies: 2
    Last Post: 07-06-2009, 06:06 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