I have a subform FacltUndrInvoice. this subform gives me the different charges for rooms used in guest house.
based on this i have a text field in the subform footer which should give the total of the above charges.
the text field giving total charge for each entry in the subform uses this code
Code:
=nz((Facility_Charges(nz([Fclt]),"Monthly")*nz([txtFcltUsgMnths]))+Facility_Charges(nz([Fclt]),"Weekly")*nz([txtFcltUsgDys])),0)
where Facility_Charges is a udf extracting charges from a rates table using dlookup function and txtFcltUsgMnths is the total number of months (if any) and txtFcltUsgDys is the total number of days.
when I use
Code:
=Sum(nz((Facility_Charges(nz([Fclt]),"Monthly")*nz([txtFcltUsgMnths]))+Facility_Charges(nz([Fclt]),"Weekly")*nz([txtFcltUsgDys])),0)
for the total of such charges in the subform footer this gives me an error. I tried all possible ways I could but could not remove the error.
Please help me out in this, I need an insight desperately. Please let me know if any more information is required.