I have what should be a simple query:
The issue is this line:
If I remove the condition
SQL:
SELECT
qry_receipt_bay_progress_2.[Cases Expected],
qry_receipt_bay_progress_2.[Cases Receipted],
qry_receipt_bay_progress_2.[Packs Expected],
IIf(
[VP] = 0,
0,
-Int(-([Cases Receipted] / ([VP] * [SP])))
) AS [Packs Receipted]
FROM
qry_receipt_bay_progress_2;
The issue is this line:
SQL:
IIf(
[VP] = 0,
0,
-Int(-([Cases Receipted] / ([VP] * [SP])))
) AS [Packs Receipted]
If I remove the condition
-Int(-([Cases Receipted] / ([VP] * [SP])))
returns the correct number when the VP is not 0 and #Num! when it is. So I want to add a condition to return 0 if VP is 0 but I just get Error if I use IIF(), Nz() also returns #Num!