Unable to add in a report

A

Ana

Hi,

I need to add the orders based on customer id so in access03 I filter the
data field as:

=IIf([cust_id]=2;Sum([cust_id]);'') or

=IIf([cust_id]=2;count([cust_id]);'') but don't work.

Where do I err?

TIA

Ana



Query in SQL05 -> access03
 
M

Marshall Barton

Ana said:
I need to add the orders based on customer id so in access03 I filter the
data field as:

=IIf([cust_id]=2;Sum([cust_id]);'') or

=IIf([cust_id]=2;count([cust_id]);'') but don't work.


You should probably use a separate query to calculate all
the totals and use that as the basis for a summary
subreport.

FYI, your expressions above should be:

=Sum(IIf([cust_id]=2, 1, 0))
or
=Count(IIf([cust_id]=2, 1 Null))
 
C

Comcast Groups

Ana,
I see two syntax problems...
1. Using ; to separate elements in the IIF (should be a comma , )
2. Using " to represent null (should be "")

Try...(I assume you're summing in a footer, and that CustID is Numeric)
=Sum(IIF(Cust_ID = 2, 1, 0)
 

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

Top