display a message to add data to corresponding table name

KevinSlater

Registered User.
Local time
Today, 01:20
Joined
Aug 5, 2005
Messages
249
Hi, does anyone know how to create a query/or form that promts the user with a message box that says "enter table name", from this if the user types "A" then table A will be opened for the user to add data into or if the user types in "B" then table B will be opened for the user to add data into. Ideally I would like a form that opens (either form a or form b) that allows the user to enter the details into the corresponding table (a or b)

Tables A & B are both emty to start of with. The field names in both tables are: user_id, firstname, lastname, date

Please help?
 
Seeing as the table "A" and table "B" both have exactly the same structure, then it is unlikely that it is necessary to separate your data into two tables.

There may be exceptional circumstances that require this, but normally it is because people fail to understand that there is a difference between constructing databases in a DBMS, than in something like a spreadsheet.

So I urge you to reconsider the design of your database, a better approach would be too have an extra field in your database that identifies which of the two choices, A or B. the entry you are making falls into.

Having said that, you are entitled to construct your database in the manner you see fit, however if you decide to follow a nonstandard way of building your database, you will run into "nonstandard"" problems, for which you may find it difficult to find solutions.

If you follow the recommended method of building a database, most of the problems you will run into have already been solved, and you are more likely to receive help.
 
Thanks for your reply & advice, I understand what your saying, but the reason I need to seperate the data/tables (even though they have the same fields) is that depending on what department the user works in determines which data can be added to which table. I know I could just have a department field in the one table but this is not what I want & the database is more complicated to do just that & there is other tables involved but didnt want to mention them for now to try to make it clearer to understand what im trying to do. Maybe its possible to do using VB code within Accsess?

any further help would be appreciated
 

Users who are viewing this thread

Back
Top Bottom