Re: Another Check Box Question
- From: Teresa Anderson <teresa_bsn@xxxxxxxxxxxxxx>
- Date: Fri, 25 Jan 2008 12:51:01 -0800
SELECT GPM.Zone, GPM.[Block Number], Sum(GPM.GPM) AS SumOfGPM
FROM GPM
WHERE (((GPM.[On/Off])=True))
GROUP BY GPM.Zone, GPM.[Block Number];
--
Teresa B Anderson
"KARL DEWEY" wrote:
Go into the SQL, copy, paste in a post so we can see what your query looks.
like. Also post a sample of your results and point out where the error is.
--
KARL DEWEY
Build a little - Test a little
"Teresa Anderson" wrote:
I didn't get an error message...I just did not get the outcome I was looking
for.
--
Teresa B Anderson
"John Spencer" wrote:
Saying "It did not work" is not very descriptive of the problem.
Did you get an error message?
Did you get the wrong results? If so, why do you think they are wrong?
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
"Teresa Anderson" <teresa_bsn@xxxxxxxxxxxxxx> wrote in message
news:AB4E769D-E49E-4D81-B6E7-E31EEDD422A9@xxxxxxxxxxxxxxxx
Thanks again John...I've done everything EXACTLY the way you said but it
did
not work. I guess you are right...I will have to take some classes on
Access. Thanks so much for your patience with me and explaning it so even
I
could understand.
--
Teresa B Anderson
"John Spencer" wrote:
The top section is what the SQL looks like if you write the SQL directly.
The Design view is just a way to let you click and point to build the
query.
I don't know how to make the second part (using design view - the query
grid) much simpler, but I will try.
-- Add your table
-- Add the four fields
-- Select View: Totals from the menu
---- In the menubar at the top of the window click on view and then
select
Totals from the list of items
----When you do so, the query grid will add a new row entitled Total:
and
under each of the fields you will see the words Group By
-- Change Group By to Sum under GPM
---- Click on Group by under GPM
---- Select SUM from the drop down list (or just type SUM)
-- Change Group By to Where under the Checkbox field
---- Select WHERE from the drop down list (or just type WHERE)
-- In the Criteria "Cell" under the Checkbox field, type TRUE
-- Run the query
If you still can't do this, then I suggest (gently) that you will need to
take a course on using Access or get Access for Dummies or hire someone
to
come in and help.
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
"Teresa Anderson" <teresa_bsn@xxxxxxxxxxxxxx> wrote in message
news:CC8178C5-BC07-41FE-AD69-F3710264198B@xxxxxxxxxxxxxxxx
Thanks John...
I am not exactly sure what you mean in the top section.
In the 2nd section...
I get In the query grid
--Add your table (done that)
--Add the four fields (done that)
but I am not understanding the rest.
As I mentioned before...I'm am really NEW to Access, can you really
detailed
with your explination?
--
Teresa B Anderson
"John Spencer" wrote:
SELECT ZONE, Block, Sum(GPM) as TotalGPM
FROM YourTable
WHERE CheckboxName = True
GROUP BY Zone, Block
In the query grid
-- Add your table
-- Add the four fields
-- Select View: Totals from the menu
-- Change Group By to Sum under GPM
-- Change Group By to Where under the Checkbox field
-- Set Criteria to TRUE under the Checkbox field
-- Run the query.
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
"Teresa Anderson" <teresa_bsn@xxxxxxxxxxxxxx> wrote in message
news:C20D2E63-EBA1-4E69-9CAD-E5B5113C0F60@xxxxxxxxxxxxxxxx
OK here's the deal...In my query I have colmuns as follows...
Column 1 is for Zone
Column 2 is for Block Number
Column 3 is for GPM (gallons per minute)
Column 4 is my checkbox for On/Off
What I am trying to do is create a way to calculate how many gpm of
water
is
being used. I want to be able to put a check in the box when the
water
is
running in these zones/blocks and have some sort of way to total
these
gpm.
I was thinking that creating another column (5) showing Total and
creating
some sort of function/expression there to make this calculation but
I
am
at a
loss as how to do that.
Also, I have NO experience in creating expression in Access so any
"elementary" explinations would really help.
--
Teresa B Anderson
- Follow-Ups:
- Re: Another Check Box Question
- From: KARL DEWEY
- Re: Another Check Box Question
- References:
- Re: Another Check Box Question
- From: John Spencer
- Re: Another Check Box Question
- From: Teresa Anderson
- Re: Another Check Box Question
- From: John Spencer
- Re: Another Check Box Question
- From: Teresa Anderson
- Re: Another Check Box Question
- From: John Spencer
- Re: Another Check Box Question
- From: Teresa Anderson
- Re: Another Check Box Question
- From: KARL DEWEY
- Re: Another Check Box Question
- Prev by Date: Re: Quesry criteria
- Next by Date: Re: Another Check Box Question
- Previous by thread: Re: Another Check Box Question
- Next by thread: Re: Another Check Box Question
- Index(es):
Relevant Pages
|