I am wanting to sum up all deposits and all withdraws and get a balance. I have been unable to figure this out.
Here is my sql statement
This works fine when using access but if i use my .net program then i get the "No value given for one or more required parameters." error
What i am wanting returned is the balance only. no other fields.
thanks a bunch
Hooks
Here is my sql statement
Code:
sql = "SELECT Sum([DepositAmount])-Sum([PaymentAmount]) AS Balance " & _
"FROM(tCTransactions)" & _
"GROUP BY tCTransactions.AccountName " & _
"HAVING((tCTransactions.AccountName) = 1)"
This works fine when using access but if i use my .net program then i get the "No value given for one or more required parameters." error
What i am wanting returned is the balance only. no other fields.
thanks a bunch
Hooks