Forum Discussion
Newby trying to total all the Yes's
Hi Arnel,
1. I would only ever convert the sum once, not each individual number.
2. I sometimes use the even simpler -Sum(xyz) in projects where I'm sure it will remain in Access completely and forever. In public forums, I got out of the habit of giving this "-" advice, so that when people (OPs or readers) will eventually use another backend like SQL Server, things will still work for them. Hence the universal Abs().
Servus
Karl
****************
Access Bug Trackers
Access News
Access DevCon
Thanks for your ideas, but when I type in either of those formulas I get an error- "Data type mismatch in criteria expression". I included a couple of screen shots showing what a portion of the report and the design screens look like. I tried putting your formula in the text box next to "total approved" where it currently says "unbound". Have I done something wrong?
- arnel_gpFeb 03, 2023Steel Contributorit seems your Approval field is Short Text:
=Sum(([Approval] & "" = "Yes") * -1)