Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy form

Status
Not open for further replies.

tek2002

Programmer
Aug 21, 2001
67
0
0
US
after creating a form with all relevant controls and associated code - how do i make a copy of that form and everything in it?
 
The only way I've figured out how to do it in the past was as follows:

Go to the directory where your original form resides. Copy the form file (.frm) and paste it into the same directory. Rename the .frm file to whatever you want. Then double click on the file to open up a new project. In the "(NAME)" prompt (within properties window), change the name of the form there to what you just renamed the file too. Save the form (when asked to save the project click cancel).

Back in your old project Go to Project => Add Form then choose existing from the tab of the pop up window. Your new form should be there.

I would like to think that there's a better way to do this, but this is the only way I've found in the past.

Hope it helps.

~Kevin
 
thanks kevin - this helps and i am sure as you said that there is a better way but in the meantime this will do just fine.
 
This is ugly too, but it works.
1. Select the form in Project explorer
2. rename the form in the properties window
3. right click the form in project explorer and save as new name
4. change the name back to the original name in properties
5. right click the form in project explorer and save as old name
6. add the newly named form via project explorer

 
>I would like to think that there's a better way to do this, but this is the only way I've found in the past

There is a slightly better variant of your solution.

File/Save Form As

Then browse to VB/Template/Forms/

and save the form there.

Now, when you do Project/Add Form your form will appear as one of the options.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top