how to create a table automatically after a data is inserted?

A

Andre Bazin

Dear all,

I have two tables, tbl_Student and tbl_DSSR. Each student needs to have
their own DSSR table, which means, a student John may have a tbl_DSSR_John.
Please show me some ways to do that. Thank you very, very much. This is such
an impossible task.
 
C

Chris2

Andre Bazin said:
Dear all,

I have two tables, tbl_Student and tbl_DSSR. Each student needs to have
their own DSSR table,

Andre Bazin,

May I ask why each student needs to have an entire table on their own?


which means, a student John may have a tbl_DSSR_John.
Please show me some ways to do that. Thank you very, very much. This is such
an impossible task.

No, it's possible.


Sincerely,

Chris O.
 
T

Tim Ferguson

I have two tables, tbl_Student and tbl_DSSR. Each student needs to
have their own DSSR table, which means, a student John may have a
tbl_DSSR_John. Please show me some ways to do that. Thank you very,
very much. This is such an impossible task.

It may or may not be impossible: but it's an extremely ill-advised thing
to do. There is simply no good reason _ever_ to do what is, essentially,
code data into table names.

The thing to do is to have one big DSSR table with _field_ called
StudentName that is pointed at the FirstName (or whatever) in the Student
table. Then, to look at John's DSSRs, you simply use a query with a
criterion like "WHERE StudentName = ""John""".

Much easier, no?

All the best


Tim F
 
J

John Vinson

On Sun, 30 Jan 2005 07:43:01 -0800, "Andre Bazin" <Andre
Dear all,

I have two tables, tbl_Student and tbl_DSSR. Each student needs to have
their own DSSR table, which means, a student John may have a tbl_DSSR_John.
Please show me some ways to do that. Thank you very, very much. This is such
an impossible task.

It's a difficult task because it is AN EXTREMELY BAD IDEA.

Storing data in tablenames is *NEVER* either necessary nor
appropriate.

If you want to see all of John's data, use a Query selecting just his
data from tbl_DSSR. This Query can be used as the recordsource for a
Form or Report, can be exported to an external file, can be edited,
etc. etc. If you're concerned about security, the Query can be set up
so that John can edit only his own data as well.

If you have some specific reason why you feel that you must violate
relational design principles in this way, please explain. It's
*possible* to do what you ask with some VBA code, but I cannot imagine
a good reason for doing so.


John W. Vinson[MVP]
 
C

Chris2

John Vinson said:
On Sun, 30 Jan 2005 07:43:01 -0800, "Andre Bazin" <Andre


It's a difficult task because it is AN EXTREMELY BAD IDEA.

Storing data in tablenames is *NEVER* either necessary nor
appropriate.

Andre Bazin,

John and Tim are right. Doing what you've asked will make maintaining
and working with the database enormously harder, plus defeat most of
the advantages and capabilities of the database product.


Sincerely,

Chris O.
 

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