Results 1 to 3 of 3
  1. #1
    itfcjames is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2010
    Posts
    2

    Yes/No fields in a query

    Hi,



    I am used to working in Access but not with any SQL or coding so any help geared towards a 'beginner' would be most appreciated.

    I have in a query two Yes/No fields which are check boxes. It is a football-related database and one Yes/No field is for whether a player received a yellow card and the other is for whether a player received a red card.

    Obviously in some matches neither of the two boxes will be checked, in some matches one of the two boxes will be checked and on rare occasions, both boxes will be checked.

    Is there any way I can run the query to only show records where at least one of the boxes is checked, it doesn't matter which one is checked but I don't want the query to return those records where neither box is checked.

    Many thanks in advance for any help,

    James

  2. #2
    SoftwareMatters is offline Access VBA Developers
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    You just need an OR statement.
    So, in your query put -1 in the yellow column's criteria and -1 in the red column's criteria but the 2nd line down.

  3. #3
    itfcjames is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2010
    Posts
    2
    Hi,

    Many thanks for your help, its much appreciated

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

Similar Threads

  1. Replies: 2
    Last Post: 03-23-2011, 11:13 AM
  2. Query and populate fields
    By isnpms in forum Access
    Replies: 9
    Last Post: 08-28-2010, 08:31 AM
  3. Basic Query/totaling fields in a query
    By afisher in forum Queries
    Replies: 6
    Last Post: 08-05-2010, 01:43 PM
  4. Replies: 1
    Last Post: 06-28-2010, 11:04 PM
  5. 2 different fields into 1 column by query?
    By rainxking in forum Queries
    Replies: 1
    Last Post: 06-04-2006, 09:37 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