GPGeorge
George Hepworth
- Local time
- Yesterday, 17:02
- Joined
- Nov 25, 2004
- Messages
- 2,557
So, that would be "Yes, Duane's version raised the error?"I used Duane's version. My version gave the same amount on each record
So, that would be "Yes, Duane's version raised the error?"I used Duane's version. My version gave the same amount on each record
YesSo, that would be "Yes, Duane's version raised the error?"
Working on it.Upload a DB so show the issue.
Here's the DB. I converted text Account to AccountID. Thanks. I have two forms to select the checking account. frmBankAccounts is a bound main form with subfrmCheckRegister. frmSelectRegister has a combobox to select checking account and then opens form frmCheckRegister.Working on it.
Balance: Val(DSum("Nz(Debit,0)-Nz(Credit,0)","qryCheckRegister","AccountID = " & [AccountID] & " AND ID<=" & [ID]))
FrmSelectRegister sends a filter when it opens form frmCheckRegister.If you balance is for a specific Account then the query and DSum() must be filtered for the specific Account. I don't believe you mentioned or were clear the balance was for a specific account. Try an expression like:
Code:Balance: Val(DSum("Nz(Debit,0)-Nz(Credit,0)","qryCheckRegister","AccountID = " & [AccountID] & " AND ID<=" & [ID]))
Oops. I see you changed your response.Sorry, I was looking at the original poster’s comments. I guess this is why it is bad practice to highjack a post.
Thanks. I will give it a try.I am using Vba to set the Balance on your Query, qryCheckRegister.
see the Order By of the query.
It worker! I did try a function called FNBalance from another discussion but it didn't work because it didn't have the vba code. Thank you so much!I am using Vba to set the Balance on your Query, qryCheckRegister.
see the Order By of the query.