Results 1 to 7 of 7
  1. #1
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338

    Query help

    Hello
    I have a query that has two tables which gave me the data fine. Now i want to include a third table which holds accounts numbers and customer name. I would only like to show account numbers on the queries from the third table. Table two has customer names which should match with third table.




    Thank you

  2. #2
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Not much to go on......
    Would you post the SQL of the query you have now, the third table structure and how the three tables are related?

    From what you posted, it sounds like your structure might be flawed. If you have the customer name in two tables, your database is not normalized.

  3. #3
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    Sorry i'm new to access
    Table one and two are related by id number. I have a form with table one and in the same form i have a sub form (table two). Table three is not in the form. Table three only has customer name, account number and other info.

  4. #4
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    Here is the sql of the query
    SELECT T_DeptOfMedicineGLAccount2.[PATIENT NAME], T_DeptOfMedicineGLAccount2.CPT, T_DeptOfMedicineGLAccount2.[DOS From], T_DeptOfMedicineGLAccount2.[DOS To], T_DeptOfMedicineGLAccount2.[Payment Transfer To], T_DeptOfMedicineGLAccount2.[Date of Transfer], T_DeptOfMedicineGLAccount2.[Amount Transfer], T_DocInfo.[GL Acct #]
    FROM T_DocInfo LEFT JOIN (T_DeptOfMedicineGLAccount INNER JOIN T_DeptOfMedicineGLAccount2 ON T_DeptOfMedicineGLAccount.ID = T_DeptOfMedicineGLAccount2.[ID Main Table]) ON T_DocInfo.[Provider Name] = T_DeptOfMedicineGLAccount2.[Payment Transfer To];

  5. #5
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Quote Originally Posted by Ray67 View Post
    Sorry i'm new to access
    Table one and two are related by id number. I have a form with table one and in the same form i have a sub form (table two). Table three is not in the form. Table three only has customer name, account number and other info.
    Sorry, Table one, Table two, table three doesn't really help.

    Would you post a copy of your mdb (without sensitive data)?? Maybe just a couple of records of test data?

  6. #6
    Ray67 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    338
    Attached is the copy of data base.


    Thank you for your help.
    Attached Files Attached Files

  7. #7
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Quote Originally Posted by Ray67 View Post
    Attached is the copy of data base.


    Thank you for your help.
    In the zip file, there is only a link to the file, not the file.

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

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