nnz function?

M

Mattias

Hi

I am using Access2003 and have the below Subtotals func as datasource in a
calculated control in report.

I only get a value from "NettoprisSubtotal" nothing from the control in the
subreport.
I have made the control visible to se if there is any data in the different
records in the report, and there is data. All conctrols are currency.



Thank you in advance

Mattias

Function Subtotals() As Currency
Subtotals = nnz(Reports![KundreskontraKöpRapport]![NettoprisSubtotal]) +
nnz(Reports![KundreskontraKöpRapport]![KöpredovisningTjänsterSubreport]![NettoprisSubtotal2])
End Function

Function nnz(testvalue As Variant) As Variant
'Not Numeric return zero
If Not (IsNumeric(testvalue)) Then
nnz = 0
Else
nnz = testvalue
End If
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Setting control source in VBA 5
help with dividing formula 8
Problem with report 4
Split form 0
Convert numbers to words 2
Problem with SET & REF function 0
how to use towords formula 1
Query Question 1

Top