Go Back   Access World Forums > Microsoft Access Discussion > Queries

 
Reply
 
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
Old 05-17-2011, 05:50 PM   #1
dknj30
Newly Registered User
 
Join Date: Apr 2011
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
dknj30 is on a distinguished road
Column Headings For Crosstab Query

I am passing a sql statement for a crosstab query, as such, in VB Code:
___________
strSQL = "TRANSFORM....
"SELECT ....
"FROM .....
"WHERE....
"GROUP BY ....
"PIVOT myField IN ('Apple', 'Orange', 'Banana')

CurrentDb.QueryDefs("myQuery").SQL = strSQL
____________

If I look at the ColumnHeading property in design, it's set to 'Apple', 'Orange', 'Banana'

The query in Access however is sorting as such... Banana, Orange, Total, Apple

Why isn't my PIVOT IN line sorting the column headings in the order I want!?!?

Thanks for your help!!

dknj30 is offline   Reply With Quote
Old 05-19-2011, 12:09 AM   #2
Guus2005
AWF VIP
 
Guus2005's Avatar
 
Join Date: Jun 2007
Location: The Netherlands
Posts: 2,466
Thanks: 38
Thanked 77 Times in 73 Posts
Guus2005 has a spectacular aura about Guus2005 has a spectacular aura about Guus2005 has a spectacular aura about
Re: Column Headings For Crosstab Query

I don't know.

Please post a sample database so i can try it for myself.
Guus2005 is offline   Reply With Quote
Reply

Tags
column heading , crosstab query , order

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
crosstab query column headings David b Queries 1 01-17-2011 11:16 PM
Dynamic Crosstab Query Column Headings jlborger Queries 0 03-05-2010 03:26 PM
Crosstab Query Column Headings kevisull Queries 8 12-03-2008 08:08 AM
Hourly Column Headings in a Crosstab Query talia679 Queries 1 10-09-2002 01:11 PM
crosstab query and column headings Stew Queries 7 12-07-2001 07:31 AM




All times are GMT -8. The time now is 04:39 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World