Results 1 to 5 of 5
  1. #1
    Jamescdawson is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2012
    Location
    South Wales, UK
    Posts
    98

    Filtering a report

    I've created a report containing a field which lists a product category "Small, Medium, Large & Not Required", but I want to filter OUT the "Not Required" category from my report. Does anyone have a bit of code that will help me do this ?

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    If you have the record source for your report a query and not a table directly, then in the criteria for that field, you could put <>Not Required and it would be filtered out automatically.

    Alan

  3. #3
    Jamescdawson is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2012
    Location
    South Wales, UK
    Posts
    98
    Alan,

    Thanks for the suggestion. Can you run that past me again please..... I'm not sure about the syntax I'm supposed to be using. There IS a table field source for the record and the control source on the report has the name of that field in it. If the field was called SIZE, what should appear in the conrtol source ?.. BTW> The content of the field is usually seleced from a Pick list on a data entry form...

  4. #4
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Create a query based upon your table. Set the criteria for the field in question to <>Not Required. In the query, use the criteria you get from your search form also.

    Now for your report. You already have it built so, open the report in design view. Open the properties for the report. Right click on the report, select report in the drop down. On the Data tab, in the window for the record source, change it from the name of the table to the name of the query you are using.

    Alan

  5. #5
    Jamescdawson is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2012
    Location
    South Wales, UK
    Posts
    98
    Alan,

    Many Thanks. I got it. (As you probably guessed, I'm a bit of a Novice with Access 2010). I had a basic lack of understanding in regard to queries. This exercise has helped enormously. It now works a treat.

    Thanks again

    =Jimbo=

    Quote Originally Posted by alansidman View Post
    Create a query based upon your table. Set the criteria for the field in question to <>Not Required. In the query, use the criteria you get from your search form also.

    Now for your report. You already have it built so, open the report in design view. Open the properties for the report. Right click on the report, select report in the drop down. On the Data tab, in the window for the record source, change it from the name of the table to the name of the query you are using.

    Alan

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

Similar Threads

  1. Filtering a report
    By tarhim47 in forum Reports
    Replies: 12
    Last Post: 07-06-2011, 09:41 AM
  2. Filtering report
    By huv123 in forum Reports
    Replies: 2
    Last Post: 02-15-2011, 02:59 PM
  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. Filtering my report
    By ldarley in forum Reports
    Replies: 1
    Last Post: 09-05-2008, 09:14 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