Results 1 to 4 of 4
  1. #1
    robbeh is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2014
    Posts
    55

    Adding a new table to a query

    For argument sake these are the 3 tables.

    Table1 - holds every person in the database
    Unique ID - PK
    FName
    LName

    Table2 - holds people that have special permissions
    Relationship ID - PK
    Permissions1
    Permissions2

    Table3 - attributes only for people in table2
    Relationship ID - PK
    Colour1
    Colour2

    I have inherited this database where right now Table1 and Table2 get connected via a query. How do I connect Table3? Since Table1/2 have data added, I try and connect table 3 the query comes up blank since no entries have been made in Table3.

    I could add Colour1 and Colour2 to Table2 as a field but the issue is Table3 information gets used in multiple different queries.

    Basically, I want to add the Colour Attributes to anyone in Table2 but not store it in a separate table.

    Thanks,


    Robb

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Don't use INNER JOIN. Use RIGHT or LEFT.

    Advise not to use exact same field name in different tables. Also, no spaces or special characters/punctuation (underscore is exception).

    What are the FK fields? Did you mean RelationshipID is FK?
    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
    robbeh is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2014
    Posts
    55
    Thanks June,

    I try and follow the no space rule but kept Relationship ID as I thought they might have to be the same.

    Click image for larger version. 

Name:	relationships.JPG 
Views:	4 
Size:	60.6 KB 
ID:	23259

    Here is how the first working relationship is setup and works. The additional one is the same set up. I have tried the other two options and one throws an error saying I should do two queries and the other works but doesn't include the new table3.

    The Relationship IDs are all PK and the Unique ID is PK in the main Table1.

    I really need to work on my Access skills as I feel this should be something so easy.

  4. #4
    robbeh is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2014
    Posts
    55
    Oh man, I take it all back. Please disregard.

    The issue was I needed to use the 3rd option in the relationship (All Doc Data Table...Table1...realized I didn't block this out..ah well ) but I totally forgot to then add the tblLaserCert (Table3) to the query itself...hence why no data was showing.

    Thanks June for your help!

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

Similar Threads

  1. Adding Subtotals to a Table or Query
    By wojosh6 in forum Access
    Replies: 4
    Last Post: 12-10-2015, 07:53 AM
  2. Replies: 3
    Last Post: 09-11-2015, 03:22 PM
  3. Adding records to a join table using a query
    By brharrii in forum Queries
    Replies: 5
    Last Post: 04-12-2013, 11:08 AM
  4. Adding table to Query removes every 4th record
    By CoachBarker in forum Queries
    Replies: 1
    Last Post: 10-13-2010, 07:23 AM
  5. Adding new column to make-table query
    By dtn118 in forum Access
    Replies: 2
    Last Post: 08-03-2008, 06:51 AM

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