Results 1 to 3 of 3
  1. #1
    winterh is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    110

    Problem with a Query please help

    Hi All

    I hope you can help, if i explain what i have and what I need, and hope youwill be able to come up with some ideas.

    I have five columns within one table and each column has the same drop downlist of users, eg Had,Emma,John

    I want to run a query which will display all the columns with "hads"in, I understand I can add a criteria within the query eg "hads" butthe problem I have if I add the same criteria within the other columns it willnot display any data.

    I understand way because the criteria is looking at each column and will onlydisplay "hads" but within column one it may say "hads" butin column two it may say "Emma" but I want to see every field with"hads" in as in some cases he may be in column one and next record hemaybe in column two and Emma maybe in Column two.

    I hope this makes some sense.



  2. #2
    R_Badger is offline Knows a few tricks
    Windows XP Access 2003
    Join Date
    Feb 2012
    Location
    Suffolk, UK
    Posts
    262
    You need to use OR criteria you appear to be using AND

    The SQL would look something like

    SELECT * FROM Tablename WHERE Column1="Had" OR Column2="Had" OR Column3="Had" OR Column4="Had" OR Column5="Had"

    If using the access query builder (only really used 2003 here) then across is and, down is or

    Hope that makes sense

  3. #3
    winterh is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    110
    Thanks mate, worked like a dream :-)

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

Similar Threads

  1. Query problem
    By lamkee in forum Queries
    Replies: 13
    Last Post: 12-12-2010, 10:30 PM
  2. query problem
    By phoebe in forum Queries
    Replies: 1
    Last Post: 08-23-2010, 02:00 PM
  3. Query problem
    By phoebe in forum Access
    Replies: 1
    Last Post: 08-23-2010, 01:52 PM
  4. Query problem
    By puppychew in forum Access
    Replies: 20
    Last Post: 02-01-2010, 09:43 AM
  5. query problem i have a problem wi
    By maxx3 in forum Queries
    Replies: 0
    Last Post: 06-29-2009, 02:29 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