473,394 Members | 2,063 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to transpose rows into columns in Access

Hi,
I have seen other threads with the same question but I'm not too familiar with Access and their solutions often include writing VB code or very complex SQL statements. What I want to do is display each city in which there are offices as columns and the respective user names in rows underneath the columns.
This is how the data needs to appear in Excel:

New York San Diego Kansas City
Smith, John Smith, Jane Correia, Sabrina
Brown, Sandra Rodriguez, Carlos DePalma, John
McCain, Stephanie Johnson, Debra Obrera, Sonya
O’Brien, James
Instead of:

City User
New York Smith, John
New York Brown, Sandra
New York McCain, Stephanie
San Diego Smith, Jane
San Diego Rodriguez, Carlos
San Diego Johnson, Debra
San Diego O’Brien, James
Kansas City Correia, Sabrina
Kansas City DePalma, John
Kansas City Obrera, Sonya

All the user names are stored in one table, i.e. ASSOCIATES. What I tried doing was creating a query for every city with the list of names and then creating one final query to list the contents of each query as a column. This, however, causes Access to create so many rows of duplicate names that the computer runs out of memory. I’m assuming this is because there are no drawn relationships in the query. I wouldn’t mind having a few hundred duplicate names because I can filter with Excel but I do mind 297,233 rows of repeated names! Is there any way in Access or Excel to accomplish this?
Any help would be highly appreciated.
Jun 18 '09 #1
1 11221
puppydogbuddy
1,923 Expert 1GB
The easiest way I know of is to copy, paste, compile, run MS's Transposer function as shown in the link:
http://support.microsoft.com/kb/202176

If you not want to use the code approach above, you can always use the Transpose option that appears when you copy/cut and paste in Excel. This would require you to export your Access file to Excel, do the Transpose in Excel, then Export the Excel file back to Access. The import and export commands are usually on the File command menu in Access and on the Tools Command Menu in Excel.
Jun 22 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: sangeetha | last post by:
Hi, i need to transpose a nx1 matrix to 1xn matrix inorder to multiply with nxn matrix in c language ... can anyone help in this coding ..the nx1 matrix is pi the data type is double *pi..this is...
1
by: Chris Smith | last post by:
Experience Posters, Sorry if this is not the right group to post this question. He is my issue; Is there a way without the use of 3rd party controls, to transpose the rows of a datatable to...
7
by: Leszek Gruszka | last post by:
I wrote an aplication that write something into tableA in sql2000. I want to write the same, but transposed into tableB. Someone can help me? Any example? *** Sent via Developersdex...
8
by: Leszek Gruszka | last post by:
I wrote code, that fill TableA with records by executenonquery. But i want to have second TableB, that will be transposed TableA. My code: Public Sub SQL_Wpis() Dim sSQL As String sSQL =...
0
by: shantanu | last post by:
I am trying to convert a macro code to c# that will copy the values of a column and paste to anather through paste special. Everything is working fine but the transpose meathod to paste the column...
1
by: lenygold via DBMonster.com | last post by:
Chris Eaton created a SP to to transpose rows to columns : Here is an example of a rowtocol stored proc that takes a SQL statement as the first paramter, a delimiter as the second parameter and the...
4
by: Haas C | last post by:
Hi all, I have a table with two columns, labeled Year and Loss. In the Year field, I have the numbers 1 to 10,000, each which can or cannot repeat. In the Loss column, i have numbers...
5
by: jenniferhelen | last post by:
I have been searching threads for a while and found the instructions listed below many times, however when I get to step 6 and select to save, I always receive the following error, "The information...
12
by: jenniferhelen | last post by:
I am working with a query that has 6 columns and 101 rows; I would like to transpose the rows and columns. I have tried using a crosstab query but Access limits the row "fields" to 3 and this was...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.