Results 1 to 3 of 3
  1. #1
    lhalderman is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    1

    Relationships & Query using several related tables

    I have a main table of data with 78 locations. In this table I have a field named 'LOT_NO'.


    I have several tables of water sample data that are related to the locations and also contain a 'LOT_NO'. Samples are taken bi-annually, so twice a year I want to add the data from each location to the query so it displays in one table across

    I am trying to show historical lab results for each location. Of the 78 locations, perhaps only 65 sample at a time.

    In the query, I ALWAYS want to show ALL 78 locations whether they sample or not. Sometimes we also have a new location sampling that would not have historical sample data.

    Click image for larger version. 

Name:	sampling screenshot.JPG 
Views:	10 
Size:	58.2 KB 
ID:	35308

    Whenever I add a new relationship to the query, the records it returns are kind of random. For instance this reporting period, I had 60 that sampled but only 55 rows are returning. I want to see ALL 78 and then where there are values, the value, and where no value it would be blank.


    Any help is appreciated

    Click image for larger version. 

Name:	relationships.JPG 
Views:	10 
Size:	93.4 KB 
ID:	35309

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    Instead of 100 tables,you should have 1 table with all the dates.
    its easy to query a single date/month/year.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    As ranman said, one table for all samples. Need to fix this immediately.

    However, forcing all locations to show even when location has no data will not be simple if data is filtered.
    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.

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

Similar Threads

  1. Replies: 1
    Last Post: 06-06-2016, 06:05 PM
  2. Replies: 5
    Last Post: 12-14-2012, 04:21 PM
  3. A problem with a query with related tables
    By Evdokimos in forum Queries
    Replies: 3
    Last Post: 10-26-2012, 04:16 AM
  4. Query on related tables question
    By jpkeller55 in forum Access
    Replies: 12
    Last Post: 09-28-2010, 07:18 PM
  5. Query with related tables question
    By jpkeller55 in forum Access
    Replies: 4
    Last Post: 09-25-2010, 04:29 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