G
Guest
MS Access 2000, Windows XP
=======================
Hi,
Is there a way to run a query to get the field names from a table, instead
of hard-coding it?
An illustration will be helpful.
tblA has the following 5 fields, with [ID+Month] being the Primary Key.
====
ID
A_Process
B_Handout
C_Training
Month
The values in the table are:
ID A_Process B_Handout C_Training Month
-------------------------------------------------------
1 1 2 3
Jan
2 4 5 6
Jan
1 1 1 1
Feb
2 2 2 2
Feb
.....
What I'd like to get using a query is:
ID Q_Name Jan Feb
----------------------------------
1 A_Process 1 1
1 A_Handout 2 1
1 A_Training 3 1
2 A_Process 4 2
2 A_Handout 5 2
2 A_Training 6 2
......
I've tried designing a cross-tab query, but I have to hard-code the field
names. Is there a way to get the field names and the corresponding value
without hard-coding them?
Will appreciate any help.
Thanks.
-Amit
=======================
Hi,
Is there a way to run a query to get the field names from a table, instead
of hard-coding it?
An illustration will be helpful.
tblA has the following 5 fields, with [ID+Month] being the Primary Key.
====
ID
A_Process
B_Handout
C_Training
Month
The values in the table are:
ID A_Process B_Handout C_Training Month
-------------------------------------------------------
1 1 2 3
Jan
2 4 5 6
Jan
1 1 1 1
Feb
2 2 2 2
Feb
.....
What I'd like to get using a query is:
ID Q_Name Jan Feb
----------------------------------
1 A_Process 1 1
1 A_Handout 2 1
1 A_Training 3 1
2 A_Process 4 2
2 A_Handout 5 2
2 A_Training 6 2
......
I've tried designing a cross-tab query, but I have to hard-code the field
names. Is there a way to get the field names and the corresponding value
without hard-coding them?
Will appreciate any help.
Thanks.
-Amit