M
Mishanya
I have frmListOfAccounts showing AccountName, AccountNumber, BankName and
BranchName. It's based on query wich in turn is based on tblAccounts,
tblBanks and tblBranches.
tblTransactions tracks accounts' transactions: AccountID (from tblAccounts),
AssetID (from tblAssets), CreditDebit(1/-1), TransactionQuantity,
AssetTransactionPrice.
I want to add calculated field AccountBalance to frmListOfAccounts. Its
formula is:
Sum([TransactionQuantity]*[CreditDebit]*[CurrentAssetPrice])
but when I add tblTransactions to the form underlying query, the outcome
naturally eliminates the records of accounts which do not have any
transactions yet (they do show, though, if its AccountBalance is 0, i.e the
account had had transactions but it's Credit/Debit balance now is 0).
Still, I want to see the list of all accounts and its balances, as the form
responsible for entering transactions is accessed from frmListOfAccounts.
What approach should I use, so that
Sum([TransactionQuantity]*[CreditDebit]*[CurrentAssetPrice]) would return 0
instead of NULL in the query when there are no transactions' records for a
given account?
BranchName. It's based on query wich in turn is based on tblAccounts,
tblBanks and tblBranches.
tblTransactions tracks accounts' transactions: AccountID (from tblAccounts),
AssetID (from tblAssets), CreditDebit(1/-1), TransactionQuantity,
AssetTransactionPrice.
I want to add calculated field AccountBalance to frmListOfAccounts. Its
formula is:
Sum([TransactionQuantity]*[CreditDebit]*[CurrentAssetPrice])
but when I add tblTransactions to the form underlying query, the outcome
naturally eliminates the records of accounts which do not have any
transactions yet (they do show, though, if its AccountBalance is 0, i.e the
account had had transactions but it's Credit/Debit balance now is 0).
Still, I want to see the list of all accounts and its balances, as the form
responsible for entering transactions is accessed from frmListOfAccounts.
What approach should I use, so that
Sum([TransactionQuantity]*[CreditDebit]*[CurrentAssetPrice]) would return 0
instead of NULL in the query when there are no transactions' records for a
given account?