Veeran P Kutty
pvkutty at msn.com
Tue Feb 4 01:46:00 CST 2003
In my MS Access Accounting application, I have a table named tblAccounts which contains: AccountNo (Primary key), AccountName,MainAcNo, Main (boolean value). The accounts table is arranged like this: MainAccountNos->sub accountnos. For example: AccountNo AccountName MainAcNo Main 100000 Assets 0 yes 110000 Fixed assets 100000 yes 111000 Buildings 110000 yes 111001 Building No.1 111000 no ........... and so on.. Here all the three accounts to the top are main accounts and the fourth account is a sub account. The sub accounts are the only accounts that are taken in transactions. I could generate the total debits and total credits for each accounts through a query based on the transaction table. But the problem is: How can I get the totals for the main accounts which are not directly related to the transaction table in accordance to its position in this accounting tree hierarchy. My transactions tables: (1) tblAcDataEntryMain: VoucherNo (Primary), Date. (2) tblAcDataEntryDetail: VoucherNo, AccountNo, Description, Debit, Credit. Please help me. Thanking you, pvkutty at msn.com Veeran Kutty _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus