I'm missing something somewhere but don't know where. This is what I typed in a query parameter (Access 2007). I tried adding/removing parenthesis and spaces and brackets with no luck.
Total: ((IIf([ProdBatch_Type] Like 'Batter*',[ProdBatch_Weight]*[ProdBatch_Number_Batches]*0.9 OR [ProdBatch_Type] = "donut",[ProdBatch_Weight]*[ProdBatch_Number_Batches]*1.31,[ProdBatch_Weight]*[ProdBatch_Number_Batches])
What I want to happen is: if the batch type begins with "batter" (i.e. batter_cakes, batter_cupcakes, etc.), then multiply the number of batches times the batch weight, and multiply by 0.9; or if the batch type is "donut" then multiply the number of batches times the batch weight, and multiply by 1.31; else just multiply the number of batches with the batch weight.
Thank you!
Total: ((IIf([ProdBatch_Type] Like 'Batter*',[ProdBatch_Weight]*[ProdBatch_Number_Batches]*0.9 OR [ProdBatch_Type] = "donut",[ProdBatch_Weight]*[ProdBatch_Number_Batches]*1.31,[ProdBatch_Weight]*[ProdBatch_Number_Batches])
What I want to happen is: if the batch type begins with "batter" (i.e. batter_cakes, batter_cupcakes, etc.), then multiply the number of batches times the batch weight, and multiply by 0.9; or if the batch type is "donut" then multiply the number of batches times the batch weight, and multiply by 1.31; else just multiply the number of batches with the batch weight.
Thank you!