Results 1 to 4 of 4
  1. #1
    convey2web is offline Novice
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    2

    Search Query

    So I have a basic query question.. Is it possible to perform a search across multiple fields with one search parameter? Meaning let say I have two fields that I want to search... Owner and user. And I want to list all owners and users that contain the letters "Sm"... How would I do this?




    Thanks

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Code:
    where owner like "*" & "sm" & "*" 
    
    or user like "*" & "sm" & "*"
    for many fields, you'll need code to loop the dataset. writing them manually would be impractical.

  3. #3
    convey2web is offline Novice
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    2
    Where would I put this code?

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    in the criteria section of the query:
    Code:
    select whatever from table
    
    where [CODE HERE]

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

Similar Threads

  1. How to Search for keywords in a Query
    By Brian62 in forum Queries
    Replies: 2
    Last Post: 05-24-2010, 11:14 AM
  2. Query To search Two Tables
    By stu_C in forum Queries
    Replies: 5
    Last Post: 03-25-2010, 11:50 AM
  3. Search with in a Query
    By AccessCodeMonkey in forum Queries
    Replies: 4
    Last Post: 03-09-2010, 03:16 PM
  4. yes/no search query
    By islandboy in forum Queries
    Replies: 7
    Last Post: 06-30-2009, 09:01 AM
  5. Replies: 0
    Last Post: 04-27-2009, 12:30 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