473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Help with Totals in Report

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
2 1464
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

31
by: da Vinci | last post by:
OK, this has got to be a simple one and yet I cannot find the answer in my textbook. How can I get a simple pause after an output line, that simply waits for any key to be pressed to move on? ...
2
by: Jayjay | last post by:
When it comes to access, I'm pretty good using the built in features and can come up with some pretty complex functions to get what I need. But we have this database I'm doing for work that is...
1
by: Kissi5559 | last post by:
Hello, Can any one help me with the syntax to calculate the totals of a field? There are three fields in the query; which contains the data "O" or "T", the other which contains (total lines of...
1
by: Don Sealer | last post by:
I need some help. I have a database that right now has about 3000 entries. The database tracks products and the quantities and defects associated with the products. There are about 22 products...
6
by: KashMarsh | last post by:
Trying to show running totals on a report, except it needs to show one total amount and values being subtracted from it. For example, the report shows a Total Inventory amount (TotInvAmt). And...
17
by: EkteGjetost | last post by:
This is definitely not the smart thing to do as far as my learning goes, but desperate situations call for desperate measures. The final lab for my introduction to C programming class is due...
6
by: Aravind | last post by:
I have a query, like the following: (Assumption: an ID will not have an entry in both "Meal" and "Daily" on the same date; it can only have an entry in either "meal" or "Daily" per date) ...
5
prn
by: prn | last post by:
Hi folks, I'm looking for a little advice here. I need to create a report that is totals only, with no detail records. I have a database with a lot of individuals (people) and the report has to...
2
by: hanshirley88 | last post by:
Hi, I am doing an expense and funding report which contains a list of consumers by Region and then by SiteID. For example, Region: NE Site: NEMV 1. Mary Doe 2. Len Willams
0
by: Josetta | last post by:
Here is something really bizarre that is happening...let me see if I can describe it. I have a report which has two locations on it. Primary Location and Secondary Location. I have both...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.