New Mdb From Current Database

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

Guest

Is there a way to programatically create a new mdb containing all the tables
and relationships in the current database?
 
Martin said:
Is there a way to programatically create a new mdb containing all the
tables
and relationships in the current database?

There is a DAO command in VBA to CreateDatabase, and then you can use
CopyObject to copy each of the objects (tables, queries, forms, macros, and
modules) you desire to the newly created database. I'm sure you can
programmatically copy relationships, too, but that is something I have
never done.

Larry Linson
Microsoft Access MVP
 
Martin said:
Is there a way to programatically create a new mdb containing all the tables
and relationships in the current database?

Yes and no. The following will show you how to create the MDB,
tables, fields and relationships. However you will have to figure out
those objects and properties yourself.

See the TempTables.MDB page at my website which illustrates how to use
a temporary MDB in your app.
http://www.granite.ab.ca/access/temptables.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 

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