By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,222 Members | 1,129 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,222 IT Pros & Developers. It's quick & easy.

Help with Totals in Report

P: n/a
Hello,
I need help in calculating the total of a field. I have a field [xfer/order]
which contains ("O" or "T"). Another field [TOTAL LINES] contains numeric total
lines for "O" and "T". I want to calculate total lines for all [xfer/order] =
"O" and same for "T".

This how I want my report to look.

TOTAL LINES FOR "O" = ******
TOTAL LINES FOR "T" = *******

Where ****** is what I want to calculate.

I tried this but didn't work: Sum([TOTAL LINE](IIF([xfer/order] = "O",1,0)))
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Why not just use a query as the control source propery of your text box.

Select Sum([xfer/order]) from [Tablename] where [xfer/order] = 'O'

And check for a T in a sql statement for the other text control and your done.

You could also create an access query on the query tab and choose it using the
expression builder. That would end up having the same result as well.

Keep things simple.
Hope this helps you

Kissi5559 wrote:
Hello,
I need help in calculating the total of a field. I have a field [xfer/order]
which contains ("O" or "T"). Another field [TOTAL LINES] contains numeric total
lines for "O" and "T". I want to calculate total lines for all [xfer/order] =
"O" and same for "T".

This how I want my report to look.

TOTAL LINES FOR "O" = ******
TOTAL LINES FOR "T" = *******

Where ****** is what I want to calculate.

I tried this but didn't work: Sum([TOTAL LINE](IIF([xfer/order] = "O",1,0)))


Nov 13 '05 #2

P: n/a
Hi,
I tried it but it didn't work, it gives me a syntax error. I want the sum of
[TOTAL LINES] when [xfer/order]="O"

Thanks.
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.