creating a calculated field

S

stuckboy

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?
 
D

Douglas J. Steele

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.
 
T

Tom Lake

stuckboy said:
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
 
D

Dennis

"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....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top