Hi All,
I've been at this for hours and can't get it to work. :banghead:
I have main form and continuous subform with payments, in the subform header is a unbound textbox that totals the payments based on criteria.
Query sums the totals and Dlookup displays in the textbox. All works well until the subform has no records and the text displays the last total from the previous record. In essence it's not calculating because there is no records on the subform and the query returns no records.. Makes sense.
I want this text to display $0.00 if there is no records instead of the inaccurate value.
If there is no records on the subform Dlookup errors with:
"You entered an expression that has no value".
Tried using NZ same thing happens.
Tried doing a Dcount, same thing happens
I thought that a record count could only be Null or zero?
Anyone have any suggestions?
Thanks in Advance
Using the following statement:
Me.txtTotalPaid = Nz(DLookup("[Total]", "qryMembSumPayments", "[mpClientID]=" & [mpClientID]), 0)
I've been at this for hours and can't get it to work. :banghead:
I have main form and continuous subform with payments, in the subform header is a unbound textbox that totals the payments based on criteria.
Query sums the totals and Dlookup displays in the textbox. All works well until the subform has no records and the text displays the last total from the previous record. In essence it's not calculating because there is no records on the subform and the query returns no records.. Makes sense.
I want this text to display $0.00 if there is no records instead of the inaccurate value.
If there is no records on the subform Dlookup errors with:
"You entered an expression that has no value".
Tried using NZ same thing happens.
Tried doing a Dcount, same thing happens
I thought that a record count could only be Null or zero?

Anyone have any suggestions?
Thanks in Advance
Using the following statement:
Me.txtTotalPaid = Nz(DLookup("[Total]", "qryMembSumPayments", "[mpClientID]=" & [mpClientID]), 0)
Last edited: