Results 1 to 4 of 4
  1. #1
    ndb is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2013
    Posts
    5

    (How) Creating an Actual SEARCH Query?

    So I have numerous tables all related via a unique ID, and in a form I want to be able to search for certain sections of tables.


    I am not sure if this is actually possible, but;

    For example;

    If I type "Pilot" into the textbox, I want it to search and show every table 'Field' with the word Pilot in the title.
    and if I typed "Engineer" do the same, however finding every field with the word Engineer in it's title.

    Any ideas would be appreciated. I have searched long and hard for tutorials or other examples, but haven't found anything too helpful.

    Thanks in advance.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,820
    Why would there be multiple fields with the same data?

    As Alex's links show, build criteria string with VBA

    OR

    use a dynamic parameterized query with LIKE and wildcard parameter under every field.
    Last edited by June7; 12-09-2013 at 01:09 PM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Here is an example of adding criteria to the query.

    Code:
    Like "*" & [Please type the search text] & "*"
    You would place it in the criteria field which is located towards the bottom of the query object's window.

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

Similar Threads

  1. Creating a Search Form using query
    By sam.eade in forum Queries
    Replies: 2
    Last Post: 09-07-2013, 03:55 AM
  2. Replies: 2
    Last Post: 03-20-2013, 04:25 PM
  3. Query based on actual record
    By manicminer in forum Queries
    Replies: 4
    Last Post: 03-17-2012, 03:20 PM
  4. Query column info rather than actual value
    By nicnicman in forum Access
    Replies: 5
    Last Post: 12-15-2011, 09:21 PM
  5. Budget vs Actual
    By chaos in forum Access
    Replies: 1
    Last Post: 05-04-2011, 08:25 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