A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How do I do a summary of my records



 
 
Thread Tools Display Modes
  #1  
Old February 3rd, 2010, 11:52 PM posted to microsoft.public.access.tablesdbdesign
dannie
external usenet poster
 
Posts: 25
Default How do I do a summary of my records

I have a database set up but now I would like a summary of some different
items such as how many manholes have been input from each of the 19 areas. I
am trying to figure out how to make the calculations and display them.

I have a query that gives me a list of areas and how many manholes are in
each area but I cant seem to figure out how to get that information into a
form or report.

This is what my query SQL looks like

SELECT Inspections.Area, Count(Inspections.Area) AS NumMH
FROM Inspections
GROUP BY Inspections.Area;

Am I going about this the wrong way? Would a better idea be to use a form
and make the record source Inspections and then On Load write code that will
count the areas and then put them into designated text boxes?

Any help would be appreciated, thanks.
  #2  
Old February 4th, 2010, 12:22 AM posted to microsoft.public.access.tablesdbdesign
MPM1100
external usenet poster
 
Posts: 23
Default How do I do a summary of my records

You are on the right track. Instead of "COUNT," try "SUM."

Cheers

"dannie" wrote:

I have a database set up but now I would like a summary of some different
items such as how many manholes have been input from each of the 19 areas. I
am trying to figure out how to make the calculations and display them.

I have a query that gives me a list of areas and how many manholes are in
each area but I cant seem to figure out how to get that information into a
form or report.

This is what my query SQL looks like

SELECT Inspections.Area, Count(Inspections.Area) AS NumMH
FROM Inspections
GROUP BY Inspections.Area;

Am I going about this the wrong way? Would a better idea be to use a form
and make the record source Inspections and then On Load write code that will
count the areas and then put them into designated text boxes?

Any help would be appreciated, thanks.

  #3  
Old February 4th, 2010, 05:21 PM posted to microsoft.public.access.tablesdbdesign
Fred
external usenet poster
 
Posts: 1,451
Default How do I do a summary of my records

Or make a repor that groups by inspection areas and (untested) put a box the
group footer with a control source of =sum([area])
  #4  
Old February 4th, 2010, 05:25 PM posted to microsoft.public.access.tablesdbdesign
dannie
external usenet poster
 
Posts: 25
Default How do I do a summary of my records

How do I put the data into the text boxes on the form? Right now what the
query displays when you run it is

Area NumMH
0
APCB 16
APD3 8
APDF 2
APDG 6
APFH/CH 16
APP1 4
GODU 12
GOL2 3
GOL4 6
GOLM 6
GOOF 23
GOSO 14
GOWC 23
MECH 48

"MPM1100" wrote:

You are on the right track. Instead of "COUNT," try "SUM."

Cheers


  #5  
Old February 4th, 2010, 07:31 PM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default How do I do a summary of my records

On Thu, 4 Feb 2010 08:25:01 -0800, dannie
wrote:

How do I put the data into the text boxes on the form? Right now what the
query displays when you run it is


Create a Form based on this query; if appropriate, use it as a Subform on the
main form. (If you do so, using Continuous Form view might be most
appropriate).
--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:55 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.