Column Name based on value in another table

hllary

Registered User.
Local time
Today, 12:36
Joined
Sep 23, 2019
Messages
80
I've searched around a bit but I can't find an answer. Is it possible to name a column in a table based on a value in another table?
 
Are you asking manually or in code?
 
No, and that's a very ominous question. What do you hope to accomplish by that? How are your tables set up?
 
Either would work.
You might still have to provide some context for us to fully understand your question. If you go to the table's design view, you can manually name the field to whatever you want.
 
Sure it can be done, but likely should not be done. Does not make much sense to me and likely your tables are not designed correctly.
 
No, and that's a very ominous question. What do you hope to accomplish by that? How are your tables set up?
The data in the column is an equation based on the number of vehicles in another table. The users would like to have the number of vehicles used in the equation shown in the header.
Are you asking manually or in code?
Either would work
 
This still does not really make any sense. Can you provide a sample db or some table data? It almost sounds like something you would do in a cross tab query, but not in a table.
 
Thanks you everyone's help. From my research and what everyone has said, naming a column in a header based on a value in another table is not possible.
 
As I said it is definitely possible, I think what we all are asking is if it is logical.
 
Thanks you everyone's help. From my research and what everyone has said, naming a column in a header based on a value in another table is not possible.
I would also say this is very possible, and a crosstab query, as @MajP mentioned earlier, is probably what you're after.
 
The users would like to have the number of vehicles used in the equation shown in the header.

You posted this question in the table forum and specifically used the term "table" in your question. Users should not interact directly with tables in a database. Instead they should access data via Forms and Reports. Putting data into headers of those is possible and trivial.
 

Users who are viewing this thread

Back
Top Bottom