473,404 Members | 2,170 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,404 software developers and data experts.

Crosstab ColumnHeaders

This is a very fustration problem.

I have a crosstab query in MS Access that uses a data field (say called
"Brand") as the column headings. As I need several crosstab queries to
output data in a similar structure (basically with the same columns),
the best way SEEMED to use the ColumnHeadings property on every query to
ensure consistancy.
This all worked fine until is transpired that some of the "Brands" had
names that could not be directly used as FieldNames (e.g. "Cat.Hat
Motors").
Therefore I changed the process/code that created the ColumnHeadings
list to figure out what the column name WOULD be in the case of an
invalid field name. This Validation code simply replaces any invalid
fieldname characters with underscores.

In principle this all makes perfect sense (to me at least) but not to MS
Access.

1) If my crosstab has a column heading entry "Cat.Hat Motors" NO DATA
appears on that field
2) If my crosstab has a column heading entry "Cat_Hat Motors" NO DATA
from the "Cat.Hat" brand appears in this revised column.
3) If I remove ALL the ColumnHeadings, I CAN see data under the field
"Cat_Hat Motors"

It's almost as if I can only specify ColumnHeadings for "original" data,
and not the stuff that MS Access will create automatically to comply
with naming conventions.

Any ideas how to make ColumnHeadings work properly?
Help!!!!!!

Sean HOward

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #1
3 1788
On 27 Jun 2004 22:50:15 GMT, Sean Howard <se*********@axelero.hu>
wrote:

Try [square brackets] around the field names.
-Tom.

This is a very fustration problem.

I have a crosstab query in MS Access that uses a data field (say called
"Brand") as the column headings. As I need several crosstab queries to
output data in a similar structure (basically with the same columns),
the best way SEEMED to use the ColumnHeadings property on every query to
ensure consistancy.
This all worked fine until is transpired that some of the "Brands" had
names that could not be directly used as FieldNames (e.g. "Cat.Hat
Motors").
Therefore I changed the process/code that created the ColumnHeadings
list to figure out what the column name WOULD be in the case of an
invalid field name. This Validation code simply replaces any invalid
fieldname characters with underscores.

In principle this all makes perfect sense (to me at least) but not to MS
Access.

1) If my crosstab has a column heading entry "Cat.Hat Motors" NO DATA
appears on that field
2) If my crosstab has a column heading entry "Cat_Hat Motors" NO DATA
from the "Cat.Hat" brand appears in this revised column.
3) If I remove ALL the ColumnHeadings, I CAN see data under the field
"Cat_Hat Motors"

It's almost as if I can only specify ColumnHeadings for "original" data,
and not the stuff that MS Access will create automatically to comply
with naming conventions.

Any ideas how to make ColumnHeadings work properly?
Help!!!!!!

Sean HOward

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 13 '05 #2

Try square brackets where exactly? Adding them to the ColumnHeadings
values will only add another underscore to every "Brand".
Sean

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3
On 28 Jun 2004 02:00:18 GMT, Sean Howard <se*********@axelero.hu>
wrote:

Agreed, I spoke too soon. I seem to remember I had luck with this
before, but indeed it doesn't work. Perhaps it's best to stick with
legal column names.

-Tom.


Try square brackets where exactly? Adding them to the ColumnHeadings
values will only add another underscore to every "Brand".
Sean

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
10
by: pw | last post by:
Hi, Is that possible if the crosstab query is dynamic? Doesn't seem so as I have to specify the control source for the text boxes and the number of columns may change, along with their field...
2
by: Sherman H. | last post by:
I have a few questions for crosstab and popup form questions: 1. I created a crosstab as follows: IT Financial Operation John 21 22 ...
0
by: Adam | last post by:
Hi How I can control Column Headers in the Microsoft ListView by VBA I can add Private Sub ListView_Click() Dim lv As MSComCtlLib.ListView Set lv = Me.ListView.Object With lv '.ColumnHeaders =...
4
by: Judy | last post by:
I'm using Access 2003 and was wondering if it is possible to have a paramater selection within a crosstab query so that I wouldn't need to build a new table. I have a select query that I'm using...
7
by: newguy | last post by:
I am trying to get the totals of a table by client by type of income. This query will get what I am looking for with each unique combination as a row: SELECT Sales.Client, BillCode.Type,...
2
by: Martin Wolff | last post by:
Hi everybody, in my datagrid I want to show the text in the columnheaders working as a linklabel. It is already working, doing different things depending on the colheader, which has been...
14
by: Tina | last post by:
My employer tracks productivity/performance of clinicians (how much they bill) each week, its averages for the month, and the 6 months. These averages are compared to their expected productivity....
13
by: salad | last post by:
Operating in A97. I didn't receive much of a response conserning Pivot tables in Access. Pivot tables are nice, but a CrossTab will work for me too. Using a Pivot table, one is actually...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.