Forum Discussion
Re: Inserting empty rows
IIF needs an expression and two values for TRUE and FALSE evaluations of the expression. It should return a single VALUE and SUM should add all those values for all rows. What you provided makes perfect sense--except to Access, which is still complaining about wrong number of arguments. It is almost like IIF does not recognize that expression.
6 Replies
- Gustav_BrockIron Contributor
Clayton_cramer If you don't like IIF, then use IN:
SELECT year, Abs(Sum([cause_ID] In (15, 16))) AS incidents FROM Table2 GROUP BY year;- Clayton_cramerCopper Contributor
Gustav_Brockperfect!
- George_HepworthSilver Contributor
Clayton_cramer If you can, I would like some sample data to work with in order to see what might the problem is. Thanks.
BTW. Access most definitely will evaluate the expression once it is properly written, so please include your query with that expression with the sample data. Thanks.
- Clayton_cramerCopper Contributor
George_HepworthI tried attaching the database:
Correct the highlighted errors and try again.
- The attachment's massmurder.accdb content type (application/msaccess) does not match its file extension and has been removed.
- George_HepworthSilver Contributor
Clayton_cramer If you can, compress it into a ZIP file and see if that will upload. If not, we can try an alternate method.
- Clayton_cramerCopper Contributor
I am embarrassed to say that I cannot figure out how to export my database with just a few records in it, so it is a size that I can upload.