Results 1 to 4 of 4
  1. #1
    njain8 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    2

    Ms access table merge


    Table1
    Acct Numb Account Type Asset Mkt Val Acct Asset MV
    881009201 Main Account 30 120
    881009201 Main Account 40 120
    881009201 Main Account 20 120
    881009201 Main Account 30 120
    881009203 Sub Account 50 80
    881009203 Sub Account 10 80
    881009203 Sub Account 20 80
    Table2
    Acct Numb Account Type Asset Mkt Val Acct Asset MV
    881009201 Main Account 30 200
    881009201 Main Account 40 200
    881009201 Main Account 20 200
    881009201 Main Account 30 200
    881009201 Sub Account 80 200


    I am Having a Table1 with the information given above. I am having 2 types of account:
    1. Main Account (ending with 01)
    2. Sub Account (ending with 03)
    Now, I need a table with Having All the Main Account. But All the Sub Account Club into a Single Account No. Whose Account no. will be same as of its Main Account No. but the Account Type wii be [Sub Account].
    Now we have 2 more colums:
    1. Asset Mkt Val
    2. Acct Asset MV
    In Table 1: The [Acct Asset MV] shows the sum of Main Account ( 30+ 40+ 20+ 30= 120) and [Asset Mkt Val] shows the Sum of Sub Accont (50+10+20 = 80).
    Now in Table 2: I want to have [Acct Asset MV] should be some of all account =(120+80= 200) and in Sub Account the [Asset Mkt Val] should be 80.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    Are you saying that 881009203 is a subaccount for 881009201? How is query to know that? Do you have a table that defines these associations? Are all accounts ending in 01 main accounts? Everything else is a subaccount?

    In a query, maybe create a field with calculation for the main account

    SELECT *, Left([Acct Numb],7) & "01" AS MainNum FROM tablename;

    Now use that query as datasource for aggregate (Totals) query or a report.
    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.

  3. #3
    njain8 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    2
    Quote Originally Posted by June7 View Post
    Are you saying that 881009203 is a subaccount for 881009201? How is query to know that? Do you have a table that defines these associations? Are all accounts ending in 01 main accounts? Everything else is a subaccount?

    In a query, maybe create a field with calculation for the main account

    SELECT *, Left([Acct Numb],7) & "01" AS MainNum FROM tablename;

    Now use that query as datasource for aggregate (Totals) query or a report.

    I Know that the account ending with 03 are sub account. I have to create a table which is having:
    1. All Main Account
    2. Sub Account ending with 03 replaces with the 01(last 2 digits) and Showing the aggregate for Mkt_Val and Asset_val.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    Did you try suggestion?
    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: 05-21-2013, 12:02 PM
  2. Replies: 0
    Last Post: 03-12-2013, 02:51 PM
  3. Replies: 3
    Last Post: 11-24-2011, 10:07 AM
  4. Mail Merge with Access
    By missesclick in forum Access
    Replies: 6
    Last Post: 12-09-2010, 01:28 PM
  5. merge multiple entries in table
    By rajsa in forum Database Design
    Replies: 1
    Last Post: 07-02-2010, 07:16 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