Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 2nd, 2008, 07:03 PM
Authorized User
 
Join Date: Apr 2006
Location: , , .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cross-Tab query

Hi,

Is it possible to transform an Access cross-tab query to a table?

Example:

Cross-tab query returns:

Company South North West East
Comp1 10 11 12 14
Comp2 15 16 17 18
Comp3 19 20 21 22

I want to end up with a table which has the following fields:

Company
South
North
West
East

Thanks
Sayed

Last edited by subhanak; December 21st, 2009 at 10:50 AM..
Reply With Quote
  #2 (permalink)  
Old March 3rd, 2008, 09:37 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Can you open the query in designer view, and then click Query in the text menu, and then select Make Table query. This will make a table from your query results, which is good for the first run. Then change the query to an Append query for subsequent runs. Then also create a delete query for the new table. Then each time you want to fill the table, do this with your code:

DoCmd.SetWarnings False
DoCmd.OpenQuery "qryDELETEmyNewTable"
DoCmd.OpenQuery "qryAPPENDmyXTabData"
DoCmd.SetWarnings True

This will clean out old data, and repopulate your table with new data. Then DoCmd.OpeReport etc.

Did that help?



mmcdonal

Look it up at: http://wrox.books24x7.com
Reply With Quote
  #3 (permalink)  
Old March 3rd, 2008, 06:50 PM
Authorized User
 
Join Date: Apr 2006
Location: , , .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you Sir!

I have got the following answer from another site:(it works fine)

Create a new query that is based on your existing crosstab query. Make the new query a 'make table' query (see menu option Query > Make Table Query) and follow the on-screen steps.


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating Cross-Tab query in SQL? WebLadyBug SQL Server ASP 0 March 9th, 2007 09:57 AM
Cross Tab query aware SQL Server 2000 3 June 29th, 2006 04:22 PM
cross tab help drachx SQL Server 2000 3 October 24th, 2005 03:26 PM
cross tab s_a_ravi BOOK: Professional Crystal Reports for VS.NET 0 February 17th, 2005 06:49 AM
Cross Tab ? abdusalam Crystal Reports 2 July 25th, 2004 11:44 PM



All times are GMT -4. The time now is 03:14 AM.


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