Conditional Summing (1 Viewer)

Fornatian

Dim Person
Local time
Today, 05:22
Joined
Sep 1, 2000
Messages
1,396
Can someone please remind how to conditionally sum one value in a record based on the value of another.

E.G. I have a subform with a Paid? Yes/No checkbox and a field holding the order line value.

What I want to do is have an unbound box showing how much is outstanding on the account.

I know the control source should be somthing like:

=Sum(if([Paid]=false,[OrderLineValue],0))

All I keep getting back is #Name error.
I can do the same task using a sum query but I know I dont need to.

Any takers...

Ian
 
R

Richie

Guest
Iif ([Paid]=False, Sum([Order line vale]),0)
 

Fornatian

Dim Person
Local time
Today, 05:22
Joined
Sep 1, 2000
Messages
1,396
thanks richie,

I was being a bit slow, infact my syntax was correct i had just used the VBA 'if' not the expressioin builder 'iif'.

Thanks all

ian
 

Users who are viewing this thread

Top Bottom