Code:
SELECT N.[Select], N.Nr, N.Anno, N.OrderDate, SP.PlantType AS Fruit, N.PlantIDScion AS SCult, SP.Ipno AS SIpno, SP.Clone AS SClone, SP.Phyto AS SPhyto, IIf( Not IsNull(SP.CommercialAgent), SP.CommercialAgent,
IIf(
Not IsNull(SP.Partnership), SP.Partnership,
IIf(
Not IsNull(SP.NucliusResponse), SP.NucliusResponse,
IIf(Not IsNull(SP.Origin), SP.Origin, "O Gaats geen Agent")
)
)
) AS Agent, N.PlantIDRoot AS RCult, RP.Ipno AS RIpno, RP.Clone AS RClone, RP.Phyto AS RPhyto, N.OrderAmount, N.Allocated, N.Nursery, N.OrderBy, N.Gebied, N.sRL2Pay, N.rRL2Pay, N.TreePrice, Round(
N.TreePrice
+ IIf(N.sRL2Pay, 1, 0)
+ IIf(N.rRL2Pay, N.TreePrice * 0.20, 0)
,2) AS FinalPricePerTree, Round(
N.DeliveryQuantity
* (
N.TreePrice
+ IIf(N.sRL2Pay, 1, 0)
+ IIf(N.rRL2Pay, N.TreePrice * 0.20, 0)
)
,2) AS TotalLinePrice, "R" & Format(N.TreePrice, '0.00')
& " + sR" & Format(IIf(N.sRL2Pay, 1, 0), '0.00')
& " + r%" & Format(IIf(N.rRL2Pay, 20, 0), '0.00') AS FullBreakdown, N.OrderSize, N.CertifiedType, N.DeliveryNo, N.DeliveryDate, N.DeliveryQuantity, N.DeliveryType, N.PayableTo, IIf(N.sRL2Pay, 1, 0) AS sRoyLev, IIf(N.rRL2Pay, N.TreePrice * 0.20, 0) AS rRoyLev
FROM (TblNursOrders AS N INNER JOIN Plants AS SP ON N.PlantIDScion = SP.PlantID) INNER JOIN Plants AS RP ON N.PlantIDRoot = RP.PlantID
WHERE N.Nr = [Forms]![frmNursOrder]![Nr]
AND N.Anno = [Forms]![frmNursOrder]![Anno]
ORDER BY SP.Clone, N.PlantIDRoot, N.OrderAmount DESC;
This is confirmed to be in the form's Record Source, and the query runs fine when opened independently. However, when I try to add the FullBreakdown field to the form: