Column info as new colunm names

Frankietheflyer

New Member
Joined
Nov 17, 2017
Messages
30
Hi Accessers!
I have a table (People_Table) with personal data for each person listed in rows under the column "Name".

I want to create another table (Attendance_Table) to enter the days each person attended a function and that uses the peoples' names from the "Name" column in the People_Table as the column headers in the Attendance_Table.

I want this to be automatic rather than manual, so if I add a new person to the "Name" column in the People_Table, it adds a new column to the Attendance_Table with that name as the header.

The activity is similar to making a cross tab query, but I don't want the data or the rows to be produced under the headers.

Is this too complicated for Access or can it be done please?

Any ideas please?

Frankie
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
This is not how you should do this at all. It totally goes against normalisation rules and is extremely inefficient. Getting any meaningful reporting from it would become impossible as the data grows.

You should have the 2 tables (at least, probably a third which related to the event).

The first table should have a primary key (PK) which relates to a foreign key (FK) within the second table. This could be the name, however, that is also not recommended. Typically this would be an auto generated number. The second, you then create a relationship between the 2 tables.


It is possible using code to do what you want, however, I think most people on here would advice you to rethink this before continuing with your current design model.
 
Upvote 0
Agree with stumac.

A well-designed database should not require one to constantly be adding new fields (columns) to tables. Think about it, if you did this, you would need to update many of your Queries, Forms, and Reports to account for this EVERY time you added a new person. You will be creating a HUGE headache for yourself if you elect to go this route.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top