Copying and Pasting an Existing Form

  • Thread starter Thread starter Jack G
  • Start date Start date
J

Jack G

Often, I'd like to copy an existing form and paste it back in to the
database with a new name so that I can make revisions without destroying the
form that already works (with the intent of removing the original form after
the new one is working properly). Trouble is it never seems to work right.
I think I've found that the copy continues to use the underlying code from
the original form. If this is the case, is there some way to break this
connection to the old code?? From something I read in another post, I
tried unchecking "Track name Autocorrect Info", but that didn't help.

Thanks for any guidance.

Jack
 
When you copy a form and paste it back with a new name the only thing that
has changed in the name. The record source remains the same, the code behind
all the command buttons, combo boxes, events etc. all remain the same. Your
newly named form is not using anything related to the old form, it is the
same as the old form until you change it.

The idea of making a copy to test and update is a good idea-- what is it
that isn't working? Or what is it you are trying to do?

You can open up the properties of your newly named form and delete any
events that have code but is that really what you want to accomplish??


Jeff C
Live Well .. Be Happy In All You Do
 
Thanks Jeff,

After I copied the form and pasted and renamed it, I noticed that any code
changes I was making for the OnUpdate event didn't seem to have any affect
at all in my new form. Then I totally removed the code and
it *still* didn't make any difference - it kept on reacting to the event the
same way the old form did!

I'll keep checking - maybe one of the forms that the code is opening has
some event tied to it that I've forgotten(but I don't think so).

Jack
 
You need to remember that the code does not change when you renamed the form.
Since the code did not change, if it was referring to different controls as
if it was on Form A, but now it is on Form B, it is still referring form Form
A perspective. You really need to check every control on your form to make
sure it is referring to the right thing from the right perspective. Hope
I've helped a bit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top