Trouble with conditional statements in an Access Form. RRS feed

  • Question

  • Hello, I have been searching the forums for my problem and couldnt find a solution that would fit my needs. I have created a form that records checks and debit card usage. I have fields (check num, amount, date, a check box for cleared bank, and a combo box for check/debit). I want a checkbook balance at the bottom of my form that subtracts the sums of the cleared checks and debits from the "beginning balance" which is just a negative check for the total of my bank balance.

    I have tried to set the control source in a text box to " =sum([qryClearedChecks]Amount) " from a query that i created that has a where statement for cleared with the criteria = true(its a checkbox). This brings up #error in the text box. Should I be using a conditional statement in the text box instead? something like "if(cleared=true, sum(amount))"? I should preface this by saying I have never taken a coding course in my life and I'm sorry for angering any readers.

    After i figure this out, i would like to apply the same concept to a "checks floating" sum that lets me know my actual check book balance.

    Friday, October 12, 2012 6:40 PM

All replies

  • I messed around with this problem and found that when I set the Record Source of the Form to the query, I recieve a correct sum of the checks that have been checked off as cleared. Of course, when i change the Record Source from the original table, I am not able to view the rest of the data i.e.(the checks floating).
    Friday, October 12, 2012 8:55 PM