Hi,
I have an invoice form in which there are 3 categories of works - time based, task based and other.
For task based, there is a Dlookup formula that looks up the program used and applies a rate to the work. The problem I am having is subtotalling the tasks in the forms footer, so I can see a running total in the main form.
Below is the formula i first tried
That just result was blank.
So then I tried I tried this
All I'm getting is a zero result.
Note CategoryID #1 is Time based; #2 is task; and #3 is Other
Any help in fixing this formula would be greatly appreciated.
I have an invoice form in which there are 3 categories of works - time based, task based and other.
For task based, there is a Dlookup formula that looks up the program used and applies a rate to the work. The problem I am having is subtotalling the tasks in the forms footer, so I can see a running total in the main form.
Below is the formula i first tried
Code:
=sum(DLookUp("[Rate]","tblPrograms","PrgmID=" & [PrgmID]*[Qty]))
That just result was blank.
So then I tried I tried this
Code:
=Sum(IIf([CategoryID]=1,0,DLookUp("[Rate]","tblPrograms","PrgmID=" & [PrgmID]*[Qty])))
All I'm getting is a zero result.
Note CategoryID #1 is Time based; #2 is task; and #3 is Other
Any help in fixing this formula would be greatly appreciated.