I don't think it's Victoria's specificity that needs increasing, it's yours. Are you asking if Access/VBA has functionality similar to Excel's SUMIF and COUNTIF functions?
Columns get summed in a query or with a function that DSUMS(..) based on criteria.
So, yeah, DSUM provides the same general kind of functionality as SUMIF, when you use the appropriate criteria:
Thank you WildHare. I need to build the DSUM function in a report. The report source is a query with multiple tables. Can you provide an example of the DSUM function which uses more than table? Thank you.
eg. "Table two" Field in Query needs to be added, where "Table one".[Department]="Clinical"
You need to have both tables in your query, and joined via the Department identifier in both.
Note the syntax and quote marks. If the join field is TEXT, you need to surround its' literal value with single quote marks, all inside a double-quoted criteria string.
Basically, the DSUM function work like this:
Get me the DOMAIN SUM of [this field] in [this table] where [some field in this tablelogical opvalue[/red]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.