Solved

# Query columns/rows MS Access

Posted on 2012-08-22
Medium Priority
656 Views
The table below is a result of a parameter query that sums up all data (records) from the beginning up to AS of DATE parameter [01/01/2012] (Sum of Data 1), [02/01/2012] (Sum of Data 2), [03/01/2012] (03/01/2012).  The table below is what I get:

Month Name      Sum of Data 1      Sum of Data 2      Sum of Data 3
January            136
February                                                        162
March                                                                                            158

Is there a way to put the result in 2 columns (Month Name, SUMS).

Month Name      SUMS
January                     136
February                    162
March                     158
0
Question by:emacyam

LVL 66

Accepted Solution

Jim Horn earned 2000 total points
ID: 38322872
<wild guess>

SELECT [Month Name], Nz([Sum of Data 1],0) + Nz([Sum of Data 2],0) + Nz([Sum of Data 3],0) as sums
FROM YourTable
0

Author Closing Comment

ID: 38322884
THANK YOU!

I guess its only complicated when I make it one :-)
0

## Featured Post

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
###### Suggested Courses
Course of the Month16 days, 5 hours left to enroll