A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

can't sum figures in a report ...help please



 
 
Thread Tools Display Modes
  #1  
Old December 4th, 2009, 11:34 AM posted to microsoft.public.access.reports
Carla
external usenet poster
 
Posts: 166
Default can't sum figures in a report ...help please

I have a text box that uses an if statement to determine whether someone is
absent in my class or not. I name the text box inattendance.

I have a text box called points that assigns points to absent students
depending on which class they are currently enrolled in.

I want to sum the total points for each student. I do a simple
=sum([points]) and when I run the report I get a box that just says points
indicating that it doesn't have a definition for points. I used the name
property of the text box and called it points.

any suggestions on alernate methods or on what I am doing wrong would be
appreciated

Thanks
  #2  
Old December 4th, 2009, 01:54 PM posted to microsoft.public.access.reports
John Spencer
external usenet poster
 
Posts: 7,815
Default can't sum figures in a report ...help please

You Sum the contents of FIELDS not the contents of CONTROLS.
Assuming the field in the table is named inAttendance then try:
=Sum([inAttendance])

Fields are the place where data is stored.
Controls are objects that can display the value of a field. On a form or in a
report you see controls of many types. Textbox controls usually display the
contents of a field (Control Source), but they can display the values of an
expression.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

Carla wrote:
I have a text box that uses an if statement to determine whether someone is
absent in my class or not. I name the text box inattendance.

I have a text box called points that assigns points to absent students
depending on which class they are currently enrolled in.

I want to sum the total points for each student. I do a simple
=sum([points]) and when I run the report I get a box that just says points
indicating that it doesn't have a definition for points. I used the name
property of the text box and called it points.

any suggestions on alernate methods or on what I am doing wrong would be
appreciated

Thanks

  #3  
Old December 4th, 2009, 04:41 PM posted to microsoft.public.access.reports
Carla
external usenet poster
 
Posts: 166
Default can't sum figures in a report ...help please


I see the distinction now. Thanks for pointing that out. However, the points
are only generated on the report and aren't stored in a field. Is there a way
to sum them when they are not captured or held anywhere else?

the inattendance field only returns 'absent" or "present". I can easily get
ehttotal number of absences by doing what you suggested. I need to capture
the number of points assigned for the absence and sum them for each
individual student. Those points are what the text box called points
generates. Based on the ones saying absent then it assigns the correct number
of points.

the field where the points are generated is called points , but it only
exists on the report and no where else. Can I get that figure to be captured
somewhere else and then some it?

Thanks so much


Thanks so much for your input
"John Spencer" wrote:

You Sum the contents of FIELDS not the contents of CONTROLS.
Assuming the field in the table is named inAttendance then try:
=Sum([inAttendance])

Fields are the place where data is stored.
Controls are objects that can display the value of a field. On a form or in a
report you see controls of many types. Textbox controls usually display the
contents of a field (Control Source), but they can display the values of an
expression.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

Carla wrote:
I have a text box that uses an if statement to determine whether someone is
absent in my class or not. I name the text box inattendance.

I have a text box called points that assigns points to absent students
depending on which class they are currently enrolled in.

I want to sum the total points for each student. I do a simple
=sum([points]) and when I run the report I get a box that just says points
indicating that it doesn't have a definition for points. I used the name
property of the text box and called it points.

any suggestions on alernate methods or on what I am doing wrong would be
appreciated

Thanks

.

  #4  
Old December 4th, 2009, 05:43 PM posted to microsoft.public.access.reports
John Spencer
external usenet poster
 
Posts: 7,815
Default can't sum figures in a report ...help please

OK, so HOW do you calculate POINTS? For instance, if points is calculated
with an expression like
=IIF([inAttendance]="Present",0,2)
Then you sum the expression
= Sum(IIF([inAttendance]="Present",0,2))

And you still seem to be calling controls "fields". Please try to keep that
straight when posting, it does lead to confusion if you don't.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

Carla wrote:
I see the distinction now. Thanks for pointing that out. However, the points
are only generated on the report and aren't stored in a field. Is there a way
to sum them when they are not captured or held anywhere else?

the inattendance field only returns 'absent" or "present". I can easily get
ehttotal number of absences by doing what you suggested. I need to capture
the number of points assigned for the absence and sum them for each
individual student. Those points are what the text box called points
generates. Based on the ones saying absent then it assigns the correct number
of points.

the field where the points are generated is called points , but it only
exists on the report and no where else. Can I get that figure to be captured
somewhere else and then some it?

Thanks so much


Thanks so much for your input
"John Spencer" wrote:

You Sum the contents of FIELDS not the contents of CONTROLS.
Assuming the field in the table is named inAttendance then try:
=Sum([inAttendance])

Fields are the place where data is stored.
Controls are objects that can display the value of a field. On a form or in a
report you see controls of many types. Textbox controls usually display the
contents of a field (Control Source), but they can display the values of an
expression.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

Carla wrote:
I have a text box that uses an if statement to determine whether someone is
absent in my class or not. I name the text box inattendance.

I have a text box called points that assigns points to absent students
depending on which class they are currently enrolled in.

I want to sum the total points for each student. I do a simple
=sum([points]) and when I run the report I get a box that just says points
indicating that it doesn't have a definition for points. I used the name
property of the text box and called it points.

any suggestions on alernate methods or on what I am doing wrong would be
appreciated

Thanks

.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:24 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.