Crosstab Query: Column Headings!

K

Kath

Hi,

I had tried to do the following in order to get the column headings in a
crosstab query to appear with different names -- other than the default:

1. Go into the DESIGN view of the crosstab query

2. Right click on the field name

3. Select Properties

4. In the COLUMN HEADINGS section, enter each desired column heading in the
order in which I want them to be displayed and separate the headings with
commas

5. Close Query Properties box

6. Run query

I got an error message, stating this: Data type mismatch in criteria
expression

Note: When I run the query with the default column headings, I do not get
the error message.

What did I do wrong?

Duane had suggested that share my SQL view if I need more answers. What does
he mean? What does SQL stand for?

Thanks!
 
B

Bob Barrows [MVP]

Kath said:
Duane had suggested that share my SQL view if I need more answers.
What does he mean? What does SQL stand for?
Some will say it stands for Structured Query Language.

Basically, it's the end result of all the actions you take in the query
builder design view. Jet, the database engine, only understands SQL so
everything you do in the designer is geared towards generating the SQL
statement to be sent to Jet for execution. You can see the SQL statement
by switching to SQL View, either via the View menu, or the toolbar
button, or by right-clicking and selecting SQL View
 
J

J_Goddard via AccessMonster.com

Hi -

Note the following from the help file (Access 2000 and 2003):

Note The column headings you specify for the ColumnHeadings property must
exactly match the data values in the Column Heading field in the query design
grid. Otherwise, the data won't appear in the columns.

You cannot do what you want to do, at least not by using the ColumnHeadings
property. Since the headings are derived from the data (by specifying a
field), you would have to find a way of including the new column names as
part of the data.

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top