Thread: Calculation
View Single Post
  #3  
Old December 12th, 2006, 07:35 PM posted to microsoft.public.access.forms
Sprinks
external usenet poster
 
Posts: 531
Default Calculation

Awach,

Convert Null values to zero with the Nz function. See VBA Help for further
information and options. Try:

=Sum(Nz([ActualAmount]))

Sprinks


"awach" wrote:

I have a continous subform where the user can enter a value [Actual Amount].
Then there is a value, named [Total], that sums all of those amounts:
Sum([Actual Amount]).

However, there is a case where there may not be any records entered. In
that case, I would like [Total] to equal 0.

I tried IIf(IsNull([ActualAmount]),0,=Sum([ActualAmount]) but it doesn't
seem to be working. Any ideas?