Results 1 to 3 of 3
  1. #1
    Magnolia1 is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    May 2016
    Location
    USA
    Posts
    25

    Issue with joined tables in a query

    Hello, I need help with my query. I built 2 tables: Table 1: sub account number, account name, amount paid (Record one: abc, Tree, 100; Record two: abc, Tree, 200) and Table 2: account number, sub account number, account name (Record one: 1122, abc, Tree; Record Two: 3344, acb, Tree). I joined them by sub account number and account name. I was looking to get the following answer: Account Number; Sub Account Number; Account Name; Amount;
    1122 abc Tree 100
    3344 abc Tree 200
    but I got additional records that I do not need.


    Account Number; Sub Account Number; Account Name; Amount;
    3344 abc Tree 100
    1122 abc Tree 100
    3344 abc Tree 200
    1122 abc Tree 200
    How can I get read of theses additional records?
    Thank you for your responses. :-)

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Welcome to the forum.....

    From your question I am guessing you are pretty new using Access.

    Your table design has issues. If you don't fix the issues now, later on you will have major headaches.
    Design your tables using paper and pencil, whiteboard, chalkboard..... you get the idea...... BEFORE you start typing in Access.

    I would recommend working through these tutorials : http://www.rogersaccesslibrary.com/forum/forum46.html
    Should take you about 45 minutes - actually take the time to do the tutorials.

    I always use an autonumber type as my PK field.
    See
    Autonumbers--What they are NOT and What They Are
    http://www.utteraccess.com/wiki/index.php/Autonumbers


    Microsoft Access Tables: Primary Key Tips and Techniques
    http://www.fmsinc.com/free/newtips/primarykey.asp

    Only use letters and numbers (underscore is the exception) in object names. NO spaces, punctuation or special characters.

  3. #3
    Magnolia1 is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    May 2016
    Location
    USA
    Posts
    25
    ssanfu,
    Thank you for your response. The links that you provided contain a lot of useful information. This is a mock up query. But it is an accurate reproduction of my issue. The tables are imported from 2 different sources and missing any/all unique values or anything that I could potentially use as a unique value. I have to come up with a work around.
    Thank you again.

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

Similar Threads

  1. Counter in a query with joined tables
    By plus_stick in forum Queries
    Replies: 1
    Last Post: 10-30-2014, 06:36 AM
  2. Replies: 8
    Last Post: 06-04-2014, 10:01 AM
  3. Replies: 3
    Last Post: 04-23-2014, 08:22 PM
  4. Replies: 3
    Last Post: 07-16-2010, 12:32 PM
  5. Replies: 5
    Last Post: 08-07-2009, 05:23 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