Results 1 to 5 of 5
  1. #1
    Pluong91 is offline Novice
    Windows 11 Access 2007
    Join Date
    Aug 2022
    Posts
    2

    Data Not Showing Up If Empty in One Table

    Hello Accessforums.net!

    I'm an accountant for a alcohol distributing company and have a very strong background in Excel, I however have no knowledge of Access and looking to expend that knowledge.

    The project I'm working on is trying to consolidate multiple reports together to track the life cycle of all of our inventory items.



    The lifecycle is as follows:
    Beg Inventory-(plus)Sales-(less)SL&B-Donations-(less)Transfers-Ending Inventory

    The problem I'm running into is if there is no activity in one of the reports referenced in the lifecycle, then when I run the query that particular item will not show up.
    My initial query is showing 381 results while ideally it should be in the 800+ based on the pivot tables I'm running in excel.

    How do I get all the "item name ID" to be displayed even if there is no activity for that item? Maybe display it as blank or a 0.

    Thank you forum members!

    I tried to upload the report but unfortunately it was too large.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    if you have a query with inner joined tables, you will get zero results if 1 table is empty.
    You will want an OUTER join.
    this will show all items in the main table and those in missing or otherwise in the sub table.

  3. #3
    Pluong91 is offline Novice
    Windows 11 Access 2007
    Join Date
    Aug 2022
    Posts
    2
    I found a script for Outer Join, would I just enter it into the SQL area?

    Also would this work on every table? Ideally I would want it to find the unique item numbers in each table.
    For instance something might not have beg inventory, but might have receiving and/if those items are all sold, then it would not have ending inventory either.

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,799
    Might help if you posted a pic of your relationships window, assuming you've created them. See "how to attach files" in menu bar at the top of the forum window.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    You could create a union query on your 5 tables to get you the comprehensive list of all unique item numbers in your db (here is a link, I have not looked at it but the title matches the intent: https://www.youtube.com/watch?v=Y1B2W6VfWaw).

    Then you use that query in another one where you have outer joins from it to your 5 tables, bring the item number from the union query and the related info from each of the appropriate tables.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

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

Similar Threads

  1. Replies: 1
    Last Post: 01-19-2017, 10:13 AM
  2. Replies: 9
    Last Post: 08-08-2016, 02:57 PM
  3. Replies: 2
    Last Post: 10-24-2012, 02:53 PM
  4. Replies: 4
    Last Post: 08-08-2012, 05:49 PM
  5. Replies: 4
    Last Post: 02-27-2012, 10:29 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