RodShinall
Registered User.
- Local time
- Today, 11:09
- Joined
- Dec 21, 2006
- Messages
- 32
I am trying to build a personal check register application and I need to write a DSum statement with two criteria as the control source of an unbound text box control which give me a running balance and I can't get the syntax correct. TransactionAmount and TransactionNumber are both number fields and Account is short text. I've tried replacing the double quotes with single quotes but still get an invalid syntax error. Any help would be greatly appreciated.
txtBalance.ControlSource = "=DSum("[TransactionAmount]","tblAccountRegister","[TransactionNumber] <= " & txtTransactionNumber.Value & " AND [Account] = '" & mstrAccountNumber & "')"
txtBalance.ControlSource = "=DSum("[TransactionAmount]","tblAccountRegister","[TransactionNumber] <= " & txtTransactionNumber.Value & " AND [Account] = '" & mstrAccountNumber & "')"