Results 1 to 2 of 2
  1. #1
    BWGreen is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2014
    Posts
    13

    Search multiple fields in one table

    Hi,



    I'm not sure if this is the right section for this - if not, feel free to move it to where it should be!

    I have a database of items with multiple fields for the name of each record. These names are not unique. I want to be able to search several fields on a specific item; for example, assume the database has field_a, field_b, field_c, & field_d - if any of those match show the record.

    Can this be done? And how do I do it? I know it can be done with "pure" SQL but the powers that be here want to use Access.

    Thanks,

    Brian

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    Make many queries but each query searches only 1 field...like qsFld1, qsFld2, etc
    qsFld1.sql = select * from tbl where field_a = '" & forms!frmMain!txtBox & "'"
    qsFld2.sql = select * from tbl where field_B = '" & forms!frmMain!txtBox & "'"

    all queries would read the search value from a form.

    Make a macro could then open all (X) queries at once.

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

Similar Threads

  1. Replies: 6
    Last Post: 02-26-2014, 05:06 PM
  2. Replies: 6
    Last Post: 08-22-2013, 08:47 PM
  3. Search multiple fields from one text box
    By tommy93 in forum Queries
    Replies: 21
    Last Post: 01-10-2012, 02:18 AM
  4. Search across multiple fields
    By Nexus13 in forum Programming
    Replies: 2
    Last Post: 07-08-2011, 02:38 PM
  5. Replies: 4
    Last Post: 09-22-2010, 01:47 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