Solved

Easy Method to convert from row to column format

Posted on 2014-01-26
3
416 Views
Last Modified: 2014-03-03
I have a table with the following structure
  ProductID / ProductionDate / NumberProduced
  888               12/15/2013           25
  889               12/15/2013           17
  890               12/15/2013           19

  888               12/16/2013           12
  889               12/16/2013           30
 
  888               12/17/2013           75
  890               12/17/2013           50

I need to print a report that converts this from a row format to a columnar format
                      First          Second     Third
  Product      Date          Date          Date               Total
                     12/15/13   12/16/13  12/17/13
  888             25              12              75                   sum(888)
  889             17              30                                     sum(889)
  890             19                                50                   sum(890)
                     sum(15)     sum(16)    sum(17)         Total(sum)

The dates will be variable from 1-31 days (ability to run for whole month)
I had thought of  doing the following
  Create a query (will be modified by code for days 1-31). Query will place data in a work table with columns labeled from 1-31 (example column names: Day01Production, Day02Production, etc)
  Then my report or form will access the values in these fields to print or display.
  There are a couple of other fields that will need to be presented also. I just kept it simple
  Can this be done with a pivot table? I have worked with them in Excel. Not much experience with pivot and Access.
0
Comment
Question by:rodneygray
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 250 total points
ID: 39810878
They're known as Crosstabs in Access. Essentially you create a Crosstab query, and then build a report using that Crosstab.

Here's an Office tutorial that might help:

http://office.microsoft.com/en-us/access-help/make-summary-data-easier-to-read-by-using-a-crosstab-query-HA010229577.aspx
0
 
LVL 10

Assisted Solution

by:Luke Chung
Luke Chung earned 250 total points
ID: 39812006
Here's an example of Creating an Annual 12 Month Summary Report without VBA Code by Creatively Using a Microsoft Access Crosstab Query
http://www.fmsinc.com/MicrosoftAccess/query/crosstab-report/index.html

It's designed to handle any 12 month period. Could be adapted to handle days vs. months. A free sample database is included that you can download. Hope this helps.
0
 
LVL 30

Expert Comment

by:hnasr
ID: 39813837
Previous comments looks fine.
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

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…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

717 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