Total a column in a query

chablups

Registered User.
Local time
Today, 17:19
Joined
Feb 2, 2002
Messages
88
I have a query in which one of the fields is for "Total # of Homes". It is not an expression or a calculation. It is simply the total number of homes taken directly from the table for each record. How do I total all the records and get a grand total for all the records for "Total # of Homes" in my query.
 
If you want only the total, just enter =Sum([MyField]) in the field box and run the query. If you want a listing of the all of the records first, followed by a total then you would need to use a report.
 
RichO said:
If you want only the total, just enter =Sum([MyField]) in the field box and run the query. If you want a listing of the all of the records first, followed by a total then you would need to use a report.
While correct, a newbie might not find the explanation clear enough, so here's a paraphrase of RichO's answer.

If you want a listing of all the homes followed by a total, you can't do this directly in a query. You can turn you query into a totals query (look this up in Access Help) but this will only give you the total and not the detail. This may be all you want.

To get the full list and a total, you can use a report based on your query. The report wizard should make this pretty easy for you.

Alternatively, you can create a form to display the data and use the formula =Sum([MyField]) to show the sum in a text box. Depending on your needs a form and a subform may be a better bet.

Let us know if you need more help.
 

Users who are viewing this thread

Back
Top Bottom