473,396 Members | 1,849 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,396 software developers and data experts.

Sum of text boxes in a report

76
Hello,

I have a report and am having a hard time summing some numbers. In the detail section of the report, I have 2 text boxes that have IIF statements in them. These IIF statements return numbers, either a positive number or 0. In the Name Footer, I am trying to sum all the occurrances of Text18 and Text19, the two IIF text boxes in the detail. I type =sum([Text18]), but when I run the report, I am first prompted with a pop-up text box with the heading "Text18" and a space to enter text.

Why is it doing this and how can I fix it?

Thanks for all you help and everything you guys do,

Charlie
Nov 16 '06 #1
4 4059
nico5038
3,080 Expert 2GB
The easy solution is to move the IIF statement into your report query so it gets a fixed fieldname.
In the footer (of a group or the page/report footer) you can add a new field with as controlsource:
=Sum(fieldname)

This is the most secure way.

Nic;o)
Nov 16 '06 #2
ckpoll2
76
Thanks for your response.

I'm not sure I understand. I already have criteria in the report query. That criteria will return Type and Hours. There will be a list of different types like APC, CLIN, Overtime, etc. It will also show the number of hours for each type. What the IIF statements do is break out Overtime and Credit Hours, one IIF statement each, from the list with the criteria of if it's Overtime or Credit Hours, return the number of hours, otherwise return 0. It's these numbers or 0's that I need to sum but keep running into the problem identified above.

Any ideas?
Nov 16 '06 #3
MMcCarthy
14,534 Expert Mod 8TB
The simple answer is you cannot sum on calculated controls in Access reports.

As Nico said if you put these IIf statements in as part of your query you will have better control.

Post the full sql for the query you are currently using as the record souce for this report and also the full IIf statements and we will do what we can to help.

Hello,

I have a report and am having a hard time summing some numbers. In the detail section of the report, I have 2 text boxes that have IIF statements in them. These IIF statements return numbers, either a positive number or 0. In the Name Footer, I am trying to sum all the occurrances of Text18 and Text19, the two IIF text boxes in the detail. I type =sum([Text18]), but when I run the report, I am first prompted with a pop-up text box with the heading "Text18" and a space to enter text.

Why is it doing this and how can I fix it?

Thanks for all you help and everything you guys do,

Charlie
Nov 16 '06 #4
nico5038
3,080 Expert 2GB
Also make sure you use the NZ() function for fields in your query that might hold Null as a value like:

SELECT NZ(FieldNum) as NewFieldnum,...

Nic;o)
Nov 16 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Jayjay | last post by:
I've got a report that has a series of unbound text boxes that are being populated by some variables in code. The format is supposed to be a currancy format, but on a certain series of boxes, I...
1
by: CSDunn | last post by:
Hello, I have about 200 text boxes on an Access 2000 Report that need to have a black background if the data in the text box is 'X'. Is there a way I could create one procedure that might work...
7
by: Mark | last post by:
Hi All, I have a report which is based on a query which is used to produce QC check sheets. I have quite a few text boxes which are used to display questions depending on the value of one...
11
by: Edson Peacock | last post by:
I have a report with sub reports, one of the subreports have 12 text boxes that are 2" high and I want them all to grow if one goes to 3" high. If anyone has any suggestions they are very much...
4
by: Andrew Meador - ASCPA, MCSE, MCP+I, Network+, A+ | last post by:
I have created a report. This report needs to display records between two dates entered by the user. I put two text boxes on the report so I can enter the start and end date - I set them to use an...
7
by: NJonge01 | last post by:
Hi, I'd like to produce a report that basically looks like an excel printout. Description: Profile Print Report Detail Section with 3 bordered text boxes all text boxes are 'abutted'...
2
by: cynderborg | last post by:
I have three text boxes that are horizantally next to each other. I would like to create the look of a table on the report. The borders of all three text boxes will be visible in the report. What...
6
by: noe1818 via AccessMonster.com | last post by:
Just a quick question about lines: Is it possible to connect a text box (e.g. txtbx1 to txtbx2 and txtbx2 to txtbx3) with lines where txtbx1,2,&3 move up or down according to their values? Like...
5
by: ofilha | last post by:
I have created a report in design mode. However, some of the fields i need are dynamic. That is, i have a series of fields text boxes mostly that must show up only as needed. I also have some...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.