create form

L

Lou

Hello, I am new to this and any support is greatly appreciated.

I need to create a database in Access 2000 that holds several cases by
month. I would like to create a form with a command button that would create
a new tables and that allows me to name the table whenever the button is
clicked. I have created a tbldataentry with all my fields and TableList that
would show the tables I created. I have tried but have been unsuccessful
with the coding for the command button.

Again, thanks for any assistance or suggestions.
 
S

Sprinks

Lou, if your tables contain the same data, i.e., the same structure, you
would be much better off abandoning your current approach and instead adding
a field that would differentiate groups of records, and then creating query
definitions (or a parameter query) to allow you to select them. For example,
if your table list is currently something like:

March 2004 Cases
April 2004 Cases
May 2004 Cases

then you could add a CaseDate field to your Cases table.

Creating separate tables for data of the same structure ignores Access'
powerful query capability, and creates needless headaches--forcing redundant
form and report definitions, or to programmatically change common form and
report definitions' RecordSource.

Using the query to select the recordset of interest, you can have a single
form and report definition to display all relevant recordsets.

HTH
Kevin Sprinkel
 
Top