I have a table "Invoices" that has 20 fields named item1Cost, item2Cost, etc. This table also has 20 other fields named item1Type, item2Type, etc. These types are looking up 1 of 7 values in another table "Costing_Types".
Now I would like to get the total sum of all items per each different costing type. So, add together all items for all records that have costing type 1. And then I'll do a new query for each costing type.
I've tried doing this with functions in my report, but DSum doesn't do it. Even with an IIf statement. (I suppose it could, but it would break the 255 character limit). Is there an SQL way to do this?
Thanks in advance.
-David
Now I would like to get the total sum of all items per each different costing type. So, add together all items for all records that have costing type 1. And then I'll do a new query for each costing type.
I've tried doing this with functions in my report, but DSum doesn't do it. Even with an IIf statement. (I suppose it could, but it would break the 255 character limit). Is there an SQL way to do this?
Thanks in advance.
-David