Copying forms between databases

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This is a followup from last week. Thanks for the help I received then, but
I need more.

I am trying to craft an update routine that will copy changes in the program
to a users copy of the database. I want to be able to protect any changes
made by the user to the original format of the program so I don't want to
just copy everything across and over write the existing.

The tables are the most important part, so I copy the fields, etc without
disturbing any user defined fields that have been added. I was able to do
that without much of a problem. They are much easier to access from one
database to another.

With the forms I want to be able to copy the new instance of the form from
the "Setup" database to the user database. Since I am initiating this from
the user side, I need to be able to get the name of the forms in the "Setup"
database, determine if there is an existing form by that name in the user
database, if there is, delete it, then copy the new instance of the form from
the "Setup" database to the user database, using the same name.

I tried the way that Brendan Reynolds suggested, using a recordset and
selecting from MSysObjects, and it works ok, except that the form that is
copied doesn't have it's associated module with it. The form is in the
database window, and you can click on the design button and it opens it, but
there are is no code module when I look at the events, etc.

If there is a better way to do this, I would be happy to entertain it.
 
Please see my response in the original thread.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
Back
Top