Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fixed header name in crosstab?

Status
Not open for further replies.

easyit

Programmer
Aug 22, 2003
443
0
0
NL
Hi,

This is my query:

Code:
TRANSFORM First(tbl_beschikkingen_cono.type) AS EersteVantype
SELECT tbl_beschikkingen_cono.fk_stud_pis
FROM tbl_beschikkingen_cono
WHERE (((tbl_beschikkingen_cono.jaar)=(Eval('[Forms]![FormNEW]![cmbJaar]'))) AND ((tbl_beschikkingen_cono.fk_stud_pis) Is Not Null))
GROUP BY tbl_beschikkingen_cono.fk_stud_pis
PIVOT tbl_beschikkingen_cono.jaar;

It gives my a result for each year that is selected in the combobox. Works nice but:

The column name is the year that is selected and I rather have a fixed name like 'MyYear'. In that way I can link the query in another query. How can this be done?


EasyIT

"Do you think that’s air you're breathing?
 
Duane,

Thank you for the reply. I knew about that solution, it wasn't working for me. I have solved it by using a table containing only one record, (the column name) i.c.w. a different query approach, not using crosstab but a select query.

Regards,

Maarten

EasyIT

"Do you think that’s air you're breathing?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top