Results 1 to 4 of 4
  1. #1
    Ganymede is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    64

    Query records from multiple tables and include records not mentioned on other tables


    Sorry for the awkward title. Let me try to articulate this differently. I want to run a query for records from two tables: subpoenas and receivables. Some of the records on the subpoenas table have a corresponding record (matching key #) on receivables table. Thus, for those records, I want to include the respective invoice numbers on the query report. However, many of the records in subpoenas do not have corresponding records on receivables. I want to include those records in the query as well. However, the minute I bring the receivables table on the query, the data is immediately limited to records present on both tables. Thus, records on the subpoenas table that do not have a corresponding record on the receivables table are omitted from the query. Is there a way around this? Can I design the query to include the records from the subpoenas table that do not have corresponding records in the invoice table?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Right click on the join line between the tables to edit the join. Choose the correct "Include all records from..." option. That will change the join in SQL view from INNER to RIGHT or LEFT as appropriate to your selection.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Ganymede is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    64
    Quote Originally Posted by pbaldy View Post
    Right click on the join line between the tables to edit the join. Choose the correct "Include all records from..." option. That will change the join in SQL view from INNER to RIGHT or LEFT as appropriate to your selection.
    That did it! Thank you.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problemo!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 5
    Last Post: 12-04-2011, 10:52 PM
  2. Include Multiple Records in Email
    By gopherking in forum Programming
    Replies: 3
    Last Post: 09-21-2011, 09:29 AM
  3. Replies: 6
    Last Post: 02-10-2011, 07:09 AM
  4. Replies: 10
    Last Post: 12-13-2010, 11:49 PM
  5. Replies: 2
    Last Post: 11-05-2010, 04:47 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