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
|
|||
|
|||
creating a calculated field
Hi
I wish to add up the the sum of some data I have across a record so it is displayed in its own column at the end of the data. Eg 3 diff field of tickets types for a theatre in their own colums and they have numbers across each (etc 2 full price, 1 student) I need it to display 3 at the end of this example in its own column. How do I do this I only seem to be able to calculate the total sum for a column at the bottom which is not what I require. How do I calculate the total for 1 record? |
#2
|
|||
|
|||
creating a calculated field
The fact that you say that you can "calculate the total sum for a column at
the bottom" makes me think that you're using Excel, not Access, the database product that's part of Office Professional and the focus of this particular newsgroup. If you are using Excel, I'd recommend reposting your question to a newsgroup related to Excel. If you are using Access, you can't create calculated fields in tables. You can, however, create a query that includes a calculated field, and use the query wherever you would otherwise have used the table. In an empty cell on the Field row of the query grid, you'd put something like: Total: Nz([Field1], 0) + Nz([Field2], 0) + Nz([Field3], 0) Replace Field1, Field2 and Field3 with your actual field names. The Nz function is used to correctly handle those fields that don't have values assigned to them. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "stuckboy" wrote in message ... Hi I wish to add up the the sum of some data I have across a record so it is displayed in its own column at the end of the data. Eg 3 diff field of tickets types for a theatre in their own colums and they have numbers across each (etc 2 full price, 1 student) I need it to display 3 at the end of this example in its own column. How do I do this I only seem to be able to calculate the total sum for a column at the bottom which is not what I require. How do I calculate the total for 1 record? |
#3
|
|||
|
|||
creating a calculated field
"stuckboy" wrote in message ... Hi I wish to add up the the sum of some data I have across a record so it is displayed in its own column at the end of the data. Eg 3 diff field of tickets types for a theatre in their own colums and they have numbers across each (etc 2 full price, 1 student) I need it to display 3 at the end of this example in its own column. How do I do this I only seem to be able to calculate the total sum for a column at the bottom which is not what I require. How do I calculate the total for 1 record? If you have it set up that way, you're data's probably not normalized. You should look at the possibility of creating related records for the numbers you wish to add. How about posting your record layout here and many people here would be able to make helpful suggestions. Tom Lake |
#4
|
|||
|
|||
creating a calculated field
"stuckboy" is a college kid, who is attempting to get us to do his homework
for him, as evidenced by his posts in several Access newsgroups. FYI.... "Tom Lake" wrote: "stuckboy" wrote in message ... Hi I wish to add up the the sum of some data I have across a record so it is displayed in its own column at the end of the data. Eg 3 diff field of tickets types for a theatre in their own colums and they have numbers across each (etc 2 full price, 1 student) I need it to display 3 at the end of this example in its own column. How do I do this I only seem to be able to calculate the total sum for a column at the bottom which is not what I require. How do I calculate the total for 1 record? If you have it set up that way, you're data's probably not normalized. You should look at the possibility of creating related records for the numbers you wish to add. How about posting your record layout here and many people here would be able to make helpful suggestions. Tom Lake |
Thread Tools | |
Display Modes | |
|
|