Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2004
    Posts
    68

    Unanswered: Access Query Design

    Hello Everyone,

    In a query, how can I add multiple criteria?

    Basically, I have a users table with the Field 'Category' I am trying to produce a report that shows me a collection of Categories.

    I have 5 Categories, but I need 1 report that combines 2 types of Category.

    I want to take to take data from those users in the 'Teacher Governor' Category and also the 'Staff Governor' Category - The string I have been trying to enter at the moment is:

    "Teacher Governor" AND "Staff Governor " - I have had no luck....

    Any help would be greatly appreciated.

    PS. - If I just try a Single Criteria like "Teacher Governor" it works, I can't get the 'And' Syntax...

    Regards,

    James

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Try using the IN operator
    Code:
    WHERE field1 IN ('value1', 'value2', ... , 'valueN')
    George
    Home | Blog

  3. #3
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    AND is used when it must meet all criteria.

    OR is used when it must meet any of the criteria.

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Oops, missed that! D'oh!
    Code:
    WHERE category = "Teacher Governor"
    AND   category = "Staff Governor
    George
    Home | Blog

  5. #5
    Join Date
    Jan 2004
    Posts
    68
    Thanks very much guys, kindly appreciated.

  6. #6
    Join Date
    Jan 2004
    Posts
    68
    Hi Guys,

    Very sorry to trouble you again, but what is the exact syntax for this?

    Kind regards

    James

  7. #7
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    In the query grid, put Teacher Governor on the first criteria row and Staff Governor on the next row down. If you have any other criteria, make sure to put it on both lines.

  8. #8
    Join Date
    Jan 2004
    Posts
    68
    Rogue,

    Thank you.

    Regards,

    James

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •