I have this so far:

UPDATE ProjDemandNoOfMonths SET ProjDemandNoOfMonths.Qty = DLookUp("Qty","ProjDemandNoOfMonths","ItemNumber='" & [ItemNumber] & "' AND MonthNo=Month(Date())")
WHERE ((([D].[MonthNo]-Month(Date())) Between 1 And IIf([ProjDemandMonths].[NoOfMonths]=0,DLookUp("NoOfMonths","MP2_ProductLineNoOfMonths","ProductLine='" & [ProductLine] & "'"),DLookUp("NoOfMonths","MP2_ProjDemandMonths","ItemNumber='" & [ItemNumber] & "'"))));

i need help in changing it so it'll take the "Qty" for the ItemNumber to update the consecutive months with the value in the NoOfMonth field from the "MP2_ProjDemandMonths" INSTEAD of the NoOfMonths from "MP2_ProductLineNoOfMonths" WHEN there is a value >0 in the NofOMonth field from the "MP2_ProjDemandMonths" ONLY otherwise use the NoOfMonths field from "MP2_ProductLineNoOfMonths".

hope that made sense?