Sum with IIf

fenhow

Registered User.
Local time
Today, 15:37
Joined
Jul 21, 2004
Messages
599
Hi,

I have a subform. The form acquires data from a sum Query.

It has about 6 items

A, B, C, D, E etc..

I am trying to add an unbound txtbox on the header of the form to show me the sum total of say A, B only

I have this code but it is not adding up? Can someone please tell me what i am missing?

=Sum(IIf([Permit Status]="A" And " B",[Grantee Acres],0))

Thanks.

Fen How
 
=Sum(IIf([Permit Status]="A" And " B",[Grantee Acres],0))

How can something be A and B surely that should be Or also the correct syntax is
=Sum(IIf([Permit Status]="A" or [Permit Status]="B",[Grantee Acres],0))

I assume that their is no space before the B

Brian
 
That was it, thank you so much!!

Fen
 

Users who are viewing this thread

Back
Top Bottom