?
Solved

How to transpose an Access table exchanging fields and records

Posted on 2014-09-11
8
Medium Priority
?
950 Views
Last Modified: 2014-09-11
I have a table with less than 7 records and 10 fields.
For the purpose of making a report I want to transpose this table so that the records become fields and the fields become records.
Below I insert a picture from Excel to show exactly what I mean. Table 1 being the original and the Table 2 the required result.
I also attach a database with the  specific original table.
(I want to point out that this simple table is an extraction from a much larger table and not a once off situation.)
Demonstration of the intention.tblPromCom.accdb
0
Comment
Question by:Fritz Paul
[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
  • 2
  • 2
  • 2
  • +1
8 Comments
 
LVL 58
ID: 40316716
You want to base the report on a cross tab query in Access, which is TRANSFORM in SQL.

Jim.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 40316954
run the sub TransposeTable from the sample db
tblPromCom-rev.accdb
0
 
LVL 38

Expert Comment

by:PatHartman
ID: 40317182
@Rey,
I seem to have lost the ability to download database files.  I wrote to help for the site and they don't have the answer.  Are you able to download?  Do you have any idea what might be the problem?
Thanks,
Pat
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:Fritz Paul
ID: 40317236
Hi Rey,
That works fine although I would like to keep the [Agreements] in text format. Is there a way to do that?
Fritz
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 40317291
<I would like to keep the [Agreements] in text format.>

you can create a query that converts the fields to Text

select cstr([fieldname])
from tablex
0
 
LVL 38

Expert Comment

by:PatHartman
ID: 40317303
@Jim,
I added ee to my trusted sites list and that hosed everything.  I couldn't even get back to this thread.  I pressed the link from my email and the site didn't automatically log me on.  So I logged on but then the page I was on was something I've never seen before and there wasn't any way for me to get to even this section of the list.  Plus, every time I changed pages, I got a warning about going to a trusted site.  So, ee is no longer trusted.  But, I'm having the problem on three of the computers I use and I didn't change any settings.  It is probably an update to IE that is causing the problem so I'll see if I can get here using Chrome or something else.
Thanks
0
 

Author Closing Comment

by:Fritz Paul
ID: 40317382
Thanks.
Thanks also to Jim, who I believe also gave an excellent answer. I will however follow that up later. It will take me some time.
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Suggested Courses

762 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