Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 10th, 2005, 12:57 PM
Authorized User
 
Join Date: Apr 2005
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default Automate assigning the values from one table’s tex

I have a table called Codes where one field contains codes and the second field contains the code descriptions:

Table Name: tblCodes
Fields:

CODE: string aka char aka text
CODE_DESCRIPTION: string aka char aka text

I need to design a query that takes each field CODE and makes it a Column Heading and then drops the corresponding CODE_DESCRIPTION underneath that Column Heading as a single row entry. For example, if the table tblCODE looks this way:

CODE CODE_DESCRIPTION
E1 Regular Hours
E2 Overtime Hours
E3 Sick Hours

Then, I would need the query to make the following output:
Regular Hours Overtime Hours Sick Hours
E1 E2 E3

Can I do this using a crosstab query? If so, how? If not, is there another way to automate this with a query?

Thanks!


 
Old May 14th, 2005, 06:57 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
The task u want is explained on the Microsoft Access 2K2 on line help and is done with a function called "Transposer". Unfortunately no book i have seen about Access mention this function.
Rgds Penta.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem assigning my Array values to rows - Please Edoloto Excel VBA 1 August 18th, 2008 04:13 AM
Assigning null values in typed datasets Utsav.Kedia C# 0 January 16th, 2006 10:03 PM
Assigning null values in typed data sets Utsav.Kedia General .NET 0 January 16th, 2006 03:02 PM
Assigning values to variables in Stored Procedures AlanAtMars SQL Server 2000 3 May 4th, 2005 12:37 AM
Assigning Values to Variables shabboleth Beginning PHP 2 September 4th, 2003 07:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.