Share via

Query or script to change column headings?

Anonymous
2013-02-22T19:02:11+00:00

What would the script be to change the column names to a result of a query?

Here is what I am trying to do...

I have a table with Fields 1-5. Based on the results of a query, the data in Fields 1-5 are what I now want to have as my column headings in a new Table. Is this even possible?

To Clarify - I have Field1, Field2, Field3, Field4 and Field5.

When I run my query the data in my table comes back with A, B, C, D, E.

I now want a table that has A, B, C, D, E as the Field Names for the new Table

What is the easiest way to do this?

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. Anonymous
    2013-02-22T20:56:35+00:00

    Correction --

    Use a union query to put the data in separate records, then crosstab query to produce new output fields, and follow with a make table query.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2013-02-22T20:38:33+00:00

    Your statement 'does not work' tells me nothing that I can use to help you.  

    What was your results?

    Post the SQL of the queries that did not work.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2013-02-22T20:18:25+00:00

    Karl,

    Thank you for the quick reply. The suggestion that you have does not work.

    ~AL~

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2013-02-22T19:14:35+00:00

    Use a crosstab query followed by a make table query.

    Was this answer helpful?

    0 comments No comments