Field Names defined by query using data

  • Thread starter Thread starter Randal
  • Start date Start date
R

Randal

Is it possible to name a field with data from a table. For example, I want
to do something like

[CompanyName]![CompanyName]: CompanyClaims/EE/Yr

in the field section of the query. I know that a crosstab query somehow
uses data to create field names, but I don't need a crosstab.
 
Dear Randal:

Not easily. You could use the data to name a column in a query if you
obtain the data in code then generate the query's column name in that
code. This is actually how we simulate crosstab queries in other
database engines where it doesn't exist. This is fairly advanced.

Note: watch out for characters in the data that cannot be used in a
column name such as []'".

If you can do it with a crosstab, even though you don't need it, this
may be to your advantage.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Thanks Tom. This is a bit above my skill level.

Tom Ellison said:
Dear Randal:

Not easily. You could use the data to name a column in a query if you
obtain the data in code then generate the query's column name in that
code. This is actually how we simulate crosstab queries in other
database engines where it doesn't exist. This is fairly advanced.

Note: watch out for characters in the data that cannot be used in a
column name such as []'".

If you can do it with a crosstab, even though you don't need it, this
may be to your advantage.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts


Is it possible to name a field with data from a table. For example, I want
to do something like

[CompanyName]![CompanyName]: CompanyClaims/EE/Yr

in the field section of the query. I know that a crosstab query somehow
uses data to create field names, but I don't need a crosstab.
 
Back
Top