
Signature
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
.
John,
I tried to apply your code in the query but it was unsucessful. Are you
using a Crosstab query. Please see my SQL below from a Crosstab query. When I
plugged your query in and pointed to my field names it requireds entry. I
would like to just display the data by month with totalling up the two fields
for the month. Can is this possible?
Query used in Crosstab produces desired out come but I can not figure out
how the numbers are being totalled:
TRANSFORM Sum(qryALLDisbursments.Additional_Award) AS SumOfAdditional_Award
SELECT qryALLDisbursments.Amount_Requested,
Sum(qryALLDisbursments.Additional_Award) AS [Total Of Additional_Award]
FROM qryALLDisbursments
GROUP BY qryALLDisbursments.Amount_Requested
PIVOT Format([Date_Processed],"mmm") In
("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
> SELECT Format(DateField, "mmm") as MonthName
> , Sum(Nz(Amount_1,0) + Nz(Amount_2,0)) as Amount
[quoted text clipped - 27 lines]
> > Thanks,
> > TL
John Spencer - 13 Mar 2008 22:05 GMT
Which two fields are you trying to total? IF Additional Award and
Amount_requested are the fields and the fields are never null (blank)
then I would expect you to use
TRANSFORM SUM(Additional_Award + Amount_Requested) as TotalAmount
SELECT "A" as RowHeader
Sum(Additional_Award) AS [Total Of Additional_Award]
,SUM (Amount_Requested) as TotalRequest
FROM qryALLDisbursments
GROUP BY "A"
PIVOT Format([Date_Processed],"mmm") In
("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
> John,
>
[quoted text clipped - 46 lines]
>>> Thanks,
>>> TL
TL - 14 Mar 2008 01:20 GMT
John,
It appears to work! But, I am having a difficult time understanding so I
will just have to practice more to get a better understanding of how Crosstab
queries work and how to create them to produce desired data.
Thanks,
TL
> Which two fields are you trying to total? IF Additional Award and
> Amount_requested are the fields and the fields are never null (blank)
[quoted text clipped - 66 lines]
> >>> Thanks,
> >>> TL