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

Trying to total a text box in report

Could use some help. I don't know if I can even do whatI'm trying to
do. I have a text box in a report under the details section. It will
return a value for each line on a sepcific record set. There may be 1
line or 10 lines. What I want to do is sum the totals in that text box.
I tried putting the following code in the control source. It dosn't
like it. I don't know if I'm just putiing it in incorrectly or if it
will work at all. Thanks for any help.

DSum ( [SITE TOT] , [Forms]![Camping Receipt]!, <>)

Dec 16 '05 #1
14 2134
On 16 Dec 2005 05:07:14 -0800, "deercreek" <da*@deercreekcg.com>
wrote:

Try this in the control source for the sum field:
=Sum([SITE TOT])

-Tom.

Could use some help. I don't know if I can even do whatI'm trying to
do. I have a text box in a report under the details section. It will
return a value for each line on a sepcific record set. There may be 1
line or 10 lines. What I want to do is sum the totals in that text box.
I tried putting the following code in the control source. It dosn't
like it. I don't know if I'm just putiing it in incorrectly or if it
will work at all. Thanks for any help.

DSum ( [SITE TOT] , [Forms]![Camping Receipt]!, <>)


Dec 16 '05 #2
Yea I already tried that it dosn't work either.

Dec 16 '05 #3
You need to make sure the textbox that contains the formula =Sum([SITE
TOT]) is in a group, page, or report footer.

Dec 16 '05 #4
The text box I am trying to get it to sum in is in report footer, the
text box I'm getting info from is in the details section,
It still dose not work with the above formula.

Dec 16 '05 #5
deercreek wrote:
The text box I am trying to get it to sum in is in report footer, the
text box I'm getting info from is in the details section,
It still dose not work with the above formula.


Did you rename your text boxes when you put them into your report? If
your table/query which is the record source for the report has an actual
field named SITE TOT, then, by default, Access will name any text box
you put into the report based on SITE TOT with the same name.

Click on the text box in the details section.

Open the properties window (alt-enter if not already open)

Check the Data tab and the Control source property - this should be SITE TOT

Now, click on the "Other" tab and check the name. If the Name is SITE
TOT, then this is your source of trouble, Access is getting confused
about which SITE TOT to choose from. Change the name to txtSiteTot or
something different from the control source name.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Dec 16 '05 #6
If i understand the question correctly you are asking if i have the
text box I am trying to total and the text box where i am trying to
place the total are the same name. If that is the question no they are
not same name.

Dec 16 '05 #7
Try renaming the textbox you're summing to something without a space.
Also, to be clear, you're using Sum now instead of DSum, right? Also
take a look at the textbox you're summing to make sure the value inside
is of a numerical persuasion. It only takes one string in a column of
99 numbers to kill the whole summation.

Dec 16 '05 #8

"deercreek" <da*@deercreekcg.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
If i understand the question correctly you are asking if i have the
text box I am trying to total and the text box where i am trying to
place the total are the same name. If that is the question no they are
not same name.


Pardon me for butting in here, but I don't think that's what Tim was saying.
He said to make sure that the name of the text boxes are not the same as the
name of the field in the underlying data source. If the field is [SITE TOT]
make sure the text boxes have different names, such as tbxSite_Tot or
something.

--
Randy Harris
tech at promail dot com
I'm pretty sure I know everything that I can remember.

Dec 16 '05 #9
deercreek wrote:
If i understand the question correctly you are asking if i have the
text box I am trying to total and the text box where i am trying to
place the total are the same name. If that is the question no they are
not same name.


No, not quite what I was asking. 8)

Reread what I posted carefully with the following in mind: Does the
text box in the detail section have the same NAME property (my post
tells you how to find this) with the same name, SITE TOT (or whatever is
in the name property) as the CONTORL SOURCE (again, see my last post).

What you are describing is clearly symptomatic of Access getting
confused as to what "SITE TOT" to take into account. This caused me
hours of endless frustration years ago when I was first getting into
Access report writing. 8)

And Tom and Steve are correct as well in that you should be using "Sum"
rather than dsum in the control in the report footer.

Write back if you're still having trouble.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Dec 16 '05 #10
tried all that. My text box i'm trying to sum in the details section
(sitetot) only exists in the form. The text box I am trying to sum into
(text102) in the page footer section. The error I get is Enter
parameter value sittot.

Dec 16 '05 #11
If you're getting a message asking for a parameter value, it's likely
that you have some naming issues.

Try Sum([Forms]![frmNameOfYourForm]!NameOfYourTxtBox) .

Dec 16 '05 #12
now it asks for Reports! etc.I been telling you form Im trying to do
this in a report I don't know if that makes a difference or not. Sorry!

Dec 16 '05 #13
"deercreek" <da*@deercreekcg.com> wrote
The text box I am trying to get it to sum in is in report footer, the
text box I'm getting info from is in the details section,
It still dose not work with the above formula.
You cannot sum a Calculated Control in a Report.

If you have not, make certain that the Text Box displaying the information
you want to Sum does not have the same name as the Control Source (Field in
the RecordSource).

Instead of trying to sum Text Boxes, sum a Field in the underlying
RecordSource.

Read Help again on
DSum ( [SITE TOT] , [Forms]![Camping Receipt]!, <>)


this certainly appears to me to be invalid. DSum works against a Table or
Query ("domain"), it does not work against Fields on a Form. The Criteria is
incomplete, the "<>" means "is not equal" but you haven't specified _what_
is not equal to _what_. I would be very surprised if trying to execute that
DSum function did not generate an error message, unless it was/is used as
Control Source, in which case it might fail silently.

Larry Linson
Microsoft Access MVP

Dec 17 '05 #14
Tim Marshall wrote:
No, not quite what I was asking. 8) Write back if you're still having trouble.


Have you been able to solve your issue, Dan? If you're still having
trouble, don't give up. Sometimes stuff like what we're all suggesting
is hard to see, in fact, I think it would be a really good topic to some
how include on the mvps faq with some screen shots to help folks who are
having difficulty with understanding it. It's something that tripped me
up, personally, for a long time and in the maintenance management
support group I'm involved with that uses Access as a third party
reporting tool against Oracle/MS SQL/Omnis backends, it's a common question.

If you're really frazzled by this, maybe one of us can look at what
you're doing and actually point out what's going wrong. If you want,
(and this is not solicitation for business - it's FREE), figure out my
munged email contact in my contact info on my silly web site below and
we can figure things out from there.

I still think this is a very frequently asked question and should be
some how illustrated on the FAQ.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Dec 18 '05 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rajani | last post by:
Hello, I have a table(msaccess) with the structure... job_code text 6 style text 10 qty number fabrication text 65 ship_date date/time
3
by: CSDunn | last post by:
Hello, I have 14 fields on a report that hold integer values. The field names use the following naming convention: T1Number, T2Number ....T14Number. I need to get a 'sub total' of all fields as...
1
by: Marie | last post by:
How do you display a total from a subreport on the main report. If it makes a difference, the total is a total of a calculated field (Qty * Price). Does the total on the subreport go in the...
3
by: Pecanfan | last post by:
Hi, I've got an access report which contains a sub-report. The sub-report contains various items in a group Footer which culminates in a running sum text box called txtGrandTotal. I want to...
2
by: Ironman | last post by:
Dear Access Developers: I have an interesting problem that I hope someone could suggest how to solve: I have the following Report: Col-1 Col-2 -------- ------- 483.3 100
2
by: Jana | last post by:
Using Access 97. Background: I have a main report called rptTrustHeader with a subreport rptTrustDetails in the Details section of the main report. The main report is grouped by MasterClientID. ...
7
by: Sunil Korah | last post by:
Hi, I haven't used access reports much. I have a problem in getting the total of a group. I have 3 fields, ProgName (Program name), Pname (Participant's name) and PCategory (Participant...
2
by: bobw2961 | last post by:
I have what I hope is a simple question for some of you. I have two fields. Quantity and Price. I enter a text box named SubTotal in the detail of the report and set the control source to =*. ...
1
by: dan.cawthorne | last post by:
Kinda Confused to why i cant get a single text field to add up all the Projects that are filtered Via a Query. I Have a Query Based on a Projects Table. The Query Have a Criteria To Select a...
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
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.