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.
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.
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
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.