Database copy help

kavsmate

New member
Local time
Today, 03:13
Joined
Nov 20, 2008
Messages
4
OK, I have no idea if this is possible (if it isn't I'll just have to try a different approach), but if you don't ask, you'll never know, so here goes.

I have a very simple database that is comprised of:

1 table (called table1)
1 form (created from table1, called table1)
1 macro (programmed to close form (table1) then open it again and connected to a function button on the above form)

What I would like is something in VBA that I tag to a button so that when pressed it brings up a window and asks for a Label name. When a name is entered (it could be anything) and OK is pressed the table, form and macro are copied (structure only) and given the name entered (i.e. if Test is entered as a label, the table, form and macro are all copied and given the name Test, then the new macro is adapted to this new name so that it opens and closes the form named Test instead of table1, and the function button recognises this new macro.

Did that make sense? Sorry, I'm in a hurry. If it doesn't, I'll try and be more coherent in about an hour.

Thanks.

Edit - Sorry, the above doesn't make much sense (I was in a rush. Don't ask me why I didn't wait until later to post, I don't know)

Basically I have a simple database with 1 table in it, 1 form and 1 macro that all have the same name and all relate to each other. On the form there is a button, connected to the macro that closes and opens the form. I'll need to copy all of them a few times and rename them (all with the same name), and I'll need the macro to relate to the new form and the button, likewise. Is there anyway to automate the copying process so that all I have to do is click a button and enter the new name?
 
Last edited:
Why in the world would you need multiple copies of the same table/form/macro? What is it exactly that you are trying to accomplish?
 

Users who are viewing this thread

Back
Top Bottom