Single row data required as column header (1 Viewer)

Cassim

New member
Local time
Today, 17:31
Joined
Nov 4, 2013
Messages
8
Hi Guys,

Is there any way I can use data in the row as a column header ? I only have 1 row of data which i want to use as a header to I can link it to other tables/queries.
(Access 2007 query)

Many Thanks :)
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 12:31
Joined
Feb 19, 2002
Messages
43,484
You want to use it as a header for what? I'm going to guess as a query because you want to export it and you want it to have "nice" column names that users like. You don't need to change column names to link tables/queries to each other. Just draw the appropriate join lines or if you are creating append queries, select the columns you want as the source. Then type in the destination names. When the names are the same, Access nicely fills in the target names but when they are different, Access has no clue how to match the names so you have to do it.

In queries, you can alias any column name.

Select col1 As cola, col2 as colb, col3 as colc, etc.

So you would have to write code to read the headings table and then write SQL to select the data from some other table and alias the column names.
 

Users who are viewing this thread

Top Bottom