Results 1 to 3 of 3
  1. #1
    barcoen is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2015
    Posts
    1

    search for a word anywhere in the table with certain criteria then display some info about that


    Hi there I wonder if someone could help me,
    I have a table of information in Access and I was wondering what would be the best way to get the info I need out of it.
    for example can I search for a specific word that could be anywhere in the table in any of the cells.
    The word is 'pump' and I would also want to know if it is an inception pump or not and then I would like to see a list of clauses associated with the pump (the clauses would be in a specific colomn under a heading) how would I best go about searching this information please?
    Thanks in advance for any help

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    Make a form to do the search and a box for the word.
    Build a query for each field you need to search.
    Q1, select * from table where [fld1] like *" & forms!frmFind!txtWord & "*"
    Q2, select * from table where [fld2] like *" & forms!frmFind!txtWord & "*"
    Etc

    make a macro that opens all these qrys.
    openquery Q1
    Openquery Q2
    etc

    Button on the form will run the macro.

  3. #3
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    If you honestly need to search across multiple fields instead of just one field, that is a good indication that you have a database design issues, and your data tables are not normalized. Working with non-normalized databases can be a real pain in the neck.

    If you have any control over it, you may want to re-design your tables.
    Here is an article which can help in that endeavor: https://support.office.com/en-us/art...rs=en-US&ad=US

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

Similar Threads

  1. Replies: 4
    Last Post: 02-26-2014, 12:42 PM
  2. Replies: 7
    Last Post: 02-13-2013, 12:55 PM
  3. Replies: 6
    Last Post: 10-25-2012, 04:13 AM
  4. Search in a table and display subform
    By smahdih in forum Access
    Replies: 2
    Last Post: 10-29-2011, 01:46 PM
  5. How do I get info from Access table to Word doc.
    By slim_jim_56 in forum Import/Export Data
    Replies: 0
    Last Post: 10-04-2007, 09:56 PM

Tags for this Thread

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