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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|