jeran042
Registered User.
- Local time
- Today, 01:10
- Joined
- Jun 26, 2017
- Messages
- 127
My question has a little bit of a twist from the information (which is extensive) I find in my search.
I want to do a dsum in an unbound text box on a form, I need it to look at a query and sum the "Debit" field based on 2 criteria,
Criteria 1:account number in question
Criteria 2: Paid in the previous month, (Based on a formula)
Here is the formula I have tried so far:
The "Month" field looks like this in the query:
Any help would be greatly appreciated,
I want to do a dsum in an unbound text box on a form, I need it to look at a query and sum the "Debit" field based on 2 criteria,
Criteria 1:account number in question
Criteria 2: Paid in the previous month, (Based on a formula)
Here is the formula I have tried so far:
Code:
DSum("[DEBIT]"," qryExpense_Report ","ACCOUNT_NUMBER = '" 5040823 & " ' And Month = 'Format$(DateAdd("m",-1,Now()),"mmmm"'")
The "Month" field looks like this in the query:
Code:
Month: Format([MO_DAY],"mmmm")
Any help would be greatly appreciated,