View Full Version : adding in access is not as simple as 1..2..3


michael g
02-21-2002, 04:33 AM
Ok i can't get the count to work, he is the score, i have 5 feilds which i need to add together to produce a total.

Newscore Count
Primary Count
Publishing & Magazines Count
Secondary Count
Tertiary Count

I want to add all of these feilds to gether to give me a sub total of all teh figures.

How do i do this??????????,

ALSO if any one can help me on this one as well, i have a list of entrys in my table, now these entries can have a varity of diffrent status..e.g

do not contact
no contact name
meetings set
require info
contacted

Now each stauts can be under one of the following categorys.

Newscore Count
Primary Count
Publishing & Magazines Count
Secondary Count
Tertiary Count

Now i want to pull a count on how many newscore that have not been checked with either yes/no...can this be done, and HOW???????

Cheers in advance...Michael

KKilfoil
02-21-2002, 04:48 AM
You need to perform calculations in queries (or forms or reports), not in tables...

In a query, include the five fields to want to sum per record. Create a calculated field (look up specific steps in Help) like:

Total5: [Newscore Count] + [Primary Count] + etc for all 5 fields

Run the query (open it) and you should have your total.

If you want to count how many records have 'Yes' selected for a yes/no field (i.e. checked), create a SUMMARY query (use help again if unsure how).
Include the field you want to count twice. In the 'Total' row, set one to 'Count' and the other to 'Sum'. Run the query.

Under the hood, Access stores 'Yes' values as a -1 value, and 'No' values as a 0 value. So the 'Count' value displayed in the query results is the total number of records, and the 'Sum' value is the number of 'checked' values (with a negative sign!).