Solved

Add  Crosstab values

Posted on 2013-06-18
2
308 Views
Last Modified: 2013-06-18
I have created a crosstab query and require a total for each row. can that be achieved in the crosstab

TRANSFORM Sum(qry_datehires.[count(DDAI_SM_EquipmentHireLogID)]) AS [SumOfcount(DDAI_SM_EquipmentHireLogID)]
SELECT qry_datehires.[date(SM_HireDate_TimeOut)]
FROM qry_datehires LEFT JOIN tbllocation ON qry_datehires.SM_LocationID = tbllocation.LocationID
GROUP BY qry_datehires.[date(SM_HireDate_TimeOut)]
ORDER BY qry_datehires.[date(SM_HireDate_TimeOut)] DESC 
PIVOT tbllocation.Location;

Open in new window

0
Comment
Question by:Brogrim
2 Comments
 
LVL 22

Accepted Solution

by:
Kelvin Sparks earned 500 total points
ID: 39256026
TRANSFORM Sum(qry_datehires.[count(DDAI_SM_EquipmentHireLogID)]) AS [SumOfcount(DDAI_SM_EquipmentHireLogID)]
SELECT qry_datehires.[date(SM_HireDate_TimeOut)], Sum(qry_datehires.[count(DDAI_SM_EquipmentHireLogID)]) AS Total
FROM qry_datehires LEFT JOIN tbllocation ON qry_datehires.SM_LocationID = tbllocation.LocationID
GROUP BY qry_datehires.[date(SM_HireDate_TimeOut)]
ORDER BY qry_datehires.[date(SM_HireDate_TimeOut)] DESC
PIVOT tbllocation.Location;

Should give you what you want


Kelvin
0
 

Author Closing Comment

by:Brogrim
ID: 39256066
Thanks
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now