Okay, the first thing to know about DSum and all its aggregate function cousins is that the fields that you pass it must be text strings.
The strings will be evaluated *before* you call the DSum function, and then DSum will magically build those exact terms into an SQL query string.
Your last term probably needs to compare something that is on the database to something else. So that last term should be coded something like
Code:
"[Expense Type] = " & Me.cboExpenseType.Column(0)
and will be evaluated to a string that reads
Code:
"[Expense Type] = 13"
If the column were a text field instead of a number, then that last term should be coded something like
Code:
"[Expense Type] = '" & Me.cboExpenseType.Column(0) & "'"
and will be evaluated to a string that reads
Code:
"[Expense Type] = 'Party Supplies'"
If the column were a date field instead of a number, then that last term should be coded something like
Code:
"[Expense Type] = #" & Me.cboExpenseType.Column(0) & "#"
and will be evaluated to a string that reads (assuming American Date order)
Code:
"[Expense Type] = #07/04/2013#"
One of those strings will be passed and concatenated onto the end of the "WHERE" clause of the SQL that will calculate DSum for you.
So, the function DSum("[a]", "[b]","[c] = d") gets transformed into the equivalent SQL call of
Code:
SELECT SUM([a]) FROM [b] WHERE [c] = d;