Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Database Design / January 2005

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andre Bazin - 30 Jan 2005 15:43 GMT
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.
Chris2 - 30 Jan 2005 16:36 GMT
> 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.
Tim Ferguson - 30 Jan 2005 19:02 GMT
> 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
John Vinson - 30 Jan 2005 21:31 GMT
>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]    
Chris2 - 30 Jan 2005 22:28 GMT
> >Dear all,
> >
[quoted text clipped - 7 lines]
> 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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.