Results 1 to 3 of 3
  1. #1
    jsher is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2015
    Posts
    1

    Joined tables on unique ID gives correct results from one table but only first result from other


    Hi I'm a newbie here and also with Access. I've constructed a query using two tables: each with a unique client ID number and a date. One is called Contacts (4543 records) and the other called Referrals (3767 records). The time span for the dates is from 01 April 2014 to 31 October 2015. Each client who makes a contact is given a unique ID number and a contact date. If the client is subsequently referred, the same ID number is used in the Referrals table and the date of referral is recorded. Most clients have only one contact and one referral but others can have multiple contacts and referrals.
    I'm trying to match the two tables using the ID number as the common variable and want to make a table that shows the contacts ID and date and the Referrals ID and date. The result is fine where clients have single contact and referral. Where mutiple contacts occur the results show each Contact date correctly but only the first Referral date. I've tried using totals and first and last but all either under-report or over report the results. Can anyone help please?

    Thanks

  2. #2
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,932
    you'll need to show your table structure and some sample data to demonstrate the problem

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Say a client has 2 contacts (how can there be more than 1?) and 3 referrals, a join on just the ContactID keys should result in 6 records.

    Post the SQL statement of the query.

    If you want to provide db follow instructions at bottom of my post.
    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. Link one table to 2 already joined tables
    By GabrielloG in forum Database Design
    Replies: 10
    Last Post: 12-17-2014, 05:00 PM
  2. Replies: 3
    Last Post: 04-23-2014, 08:22 PM
  3. Replies: 4
    Last Post: 12-30-2013, 01:49 PM
  4. Replies: 8
    Last Post: 10-03-2013, 08:11 AM
  5. Replies: 0
    Last Post: 06-15-2011, 07:02 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