Results 1 to 4 of 4
  1. #1
    timesscript is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    May 2015
    Posts
    34

    Query based on two tables only returns records if they have info in the second table

    I am trying to create a query that will give mainly info from Table A, but I would like to include Table B so that other relevant info can be shown in the query. The tables are related.



    However, not every record in Table A has something entered for the field which is related to Table B.

    Here's my problem: Whether or not I set a criteria, or even list a field from Table B in the Query, records in table A that have no entry for the field that relates them to table B are not returned in the query.

    So if I remove Table B from the query completely, those records do appear, but if I add it back in, whether or not I even list any fields from the table in the query at all, the records don't appear.

    Thanks for any help!

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Maybe you can adjust the properties of the JOIN.

    In the Query Designer, there is a line that connects two tables/queries. This line represents the JOIN. If you double click it, you will see the properties window.

    Maybe having all records from one table will produce the desired results. Because, right now it sounds like you have an INNER JOIN.

  3. #3
    timesscript is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    May 2015
    Posts
    34
    Thanks ItsMe, that did fix it!

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Glad to hear

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

Similar Threads

  1. Replies: 4
    Last Post: 02-26-2014, 12:42 PM
  2. Replies: 6
    Last Post: 12-11-2013, 01:23 PM
  3. Replies: 9
    Last Post: 05-08-2013, 02:37 PM
  4. Replies: 3
    Last Post: 11-02-2009, 04:33 AM
  5. Query returns null..based on two tables
    By shsh_shah in forum Queries
    Replies: 1
    Last Post: 03-08-2009, 01:45 PM

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