Results 1 to 8 of 8
  1. #1
    DMJ's Avatar
    DMJ is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Oct 2011
    Posts
    32

    Show all records from tables


    I have a query (attached clip of) which pulls info from 3 tables. I would like all information from the persons table and the address table to show whether there is a match or not.

  2. #2
    b-ballstyle is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2012
    Posts
    9
    Double click on the line that connects your tables in your query and you will see options to show all records from one table and not only the one that matches

  3. #3
    DMJ's Avatar
    DMJ is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Oct 2011
    Posts
    32

    Show all records from multiple tables

    Quote Originally Posted by b-ballstyle View Post
    Double click on the line that connects your tables in your query and you will see options to show all records from one table and not only the one that matches
    I followed this direction and receive the following error message.

    "The SQL statement could not be executed because it contains ambiguous outer joins. To force one of the joins to be performed first, create a separate query that performs the first join and then include that query in your SQL statement."

  4. #4
    DMJ's Avatar
    DMJ is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Oct 2011
    Posts
    32
    I don't know how to write SQL. Can I do this in Access 2007?

  5. #5
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,736

  6. #6
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    I don't know how to write SQL. Can I do this in Access 2007?
    Yes.
    I followed this direction and receive the following error message.

    "The SQL statement could not be executed because it contains ambiguous outer joins. To force one of the joins to be performed first, create a separate query that performs the first join and then include that query in your SQL statement."
    Does it return that statement just after you edit the relationship, or also before it? If it does not before, where you can get the query to work (meaning it returns data, just not all the data you want), then change your query to SQL view and copy and paste the code here (so we can see your relationshipd) and we will help you edit it.

  7. #7
    DMJ's Avatar
    DMJ is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Oct 2011
    Posts
    32
    I only get the message after I edit the relationship.
    SQL is:
    SELECT tbl_Person.Person_LastName, tbl_Person.Person_FirstName, tbl_Person.Person_MiddleName, tbl_Address.Address_Streetnumber, tbl_Address.Address_Streetname, tbl_Address.Address_Mailing, tbl_Address.City, tbl_Address.Province, tbl_Address.Postal_Code, tbl_Address.Address_Type, tbl_Address.Address_Date
    FROM tbl_Person INNER JOIN (tbl_Address INNER JOIN tlink_PersonAddress ON tbl_Address.[AddressID] = tlink_PersonAddress.[AddressID]) ON tbl_Person.[PersonID] = tlink_PersonAddress.[PersonID];

  8. #8
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    So, am I to assume that since you are using a linking table (tlink_PersonAddress), that you do not have a direct link between the Person and Address tables?

    Does your zip file in your original post have a copy of the database for us to look at (I cannot download attachments from my current location to check, but can from my home comouter when I return there)? I think seeing your table structure and sample data is key in helping you figure this out, so if that zip file does not contain that information, can you please provide it?

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

Similar Threads

  1. Replies: 3
    Last Post: 01-05-2012, 12:04 PM
  2. Replies: 4
    Last Post: 08-18-2011, 01:52 PM
  3. Show all records.
    By dennisvillareal in forum Access
    Replies: 1
    Last Post: 03-03-2011, 04:28 PM
  4. Replies: 2
    Last Post: 11-05-2010, 04:47 AM
  5. Show two tables in single table
    By access in forum Forms
    Replies: 8
    Last Post: 06-11-2009, 11:57 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