Results 1 to 3 of 3
  1. #1
    Blair is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2015
    Posts
    4

    Question Query join search

    Newbe here…sorry if not clear


    I have a query called “Compartment” pulling data from table called “comp_mod”
    Example of table “comp_mod”

    COMP MOD
    aaa 123
    bbb 456
    aaa 789
    ccc 589

    Within this query I have a Criteria [Comp?] under “COMP”…so the user can enter their desired comp.
    If user selects “aaa”…Result would be
    COMP MOD
    aaa 123
    aaa 789

    I want to take this query into another query and link it to another table called “Drawing”
    Within this table there are multiple MOD numbers in one field..
    Table “Drawing”
    MOD Drawing
    123 569 789 136 596 XXX -123
    596 789 KKK-789
    111 226 GGG-799
    112 123 998 LLL-333

    Have it take the Mod return from the query above “Compartment” and search “MOD” on table “drawing.
    To return

    MOD Drawing
    123 569 789 136 596 XXX -123
    596 789 KKK-789
    112 123 998 LLL-333


    Is this even possible?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Maybe:

    SELECT Drawings.* FROM Compartment, Drawings WHERE Compartment.Mod LIKE "*" & Drawings.MOD & "*";

    or

    SELECT Drawings.* FROM Compartment, Drawings WHERE InStr(Drawings.Mod, Compartment.Mod)>0;
    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.

  3. #3
    Blair is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2015
    Posts
    4
    You are the best...thx
    Second suggestion worked great...
    Last edited by Blair; 02-19-2015 at 08:43 AM.

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

Similar Threads

  1. Join Query?
    By KWarzala in forum Forms
    Replies: 5
    Last Post: 07-29-2014, 02:44 PM
  2. Replies: 6
    Last Post: 11-19-2013, 01:38 AM
  3. Help with a join query
    By abordeau in forum Queries
    Replies: 7
    Last Post: 10-03-2013, 11:51 AM
  4. Inner join query not quite right
    By coach32 in forum Queries
    Replies: 6
    Last Post: 07-07-2012, 03:13 AM
  5. inner join in query
    By Hrcko in forum Access
    Replies: 1
    Last Post: 02-01-2010, 05:54 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