Query field names

P

PayeDoc

Hello All

Is it possible to get the field name for a query from data within the
underlying tables?
e.g.
table [x confirmed] with text field 'practice' and currency fields 'budget
A', 'budget B', 'budget C' and 'budget D'.
table [practices] with text fields 'budget A alias', 'budget B alias',
'budget C alias' and 'budget D alias'.

I would like the query to output the values of 'budget A', 'budget B',
'budget C' and 'budget D' in fields that are named according to the values
of the corresponding 'alias' in [practices]. I know this would be easy with
a report, but I need it in the query so that I can export the data to csv
with meaningful field names.

Hope someone can help.

Many thanks
Leslie Isaacs.
 
G

ghetto_banjo

In the query design you can use any alias you want for your results.
Just put the alias name followed by a colon before the field name in
the query design.

i.e.

AliasName: [Budget A]



in this case in the csv output, the column header will be AliasName
instead of Budget A
 
P

PayeDoc

Hello Adam

Thanks for your reply.

What I need is for the query's field name to be the VALUE of the
corresponding field in [Practices] - not just "Aliasname" every time! The
values of the various aliases will change according to other parameters on
the current form, and I need the query's fields to pick up these varying
alias names.

Hope that explains it better!

Thanks again
Les
 

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