I would like to (and now be honest, wouldn't everybody) be able to create various objects in one database from another database. Here's the senario.
1. Open Database 1
2. Run a function / method.
3. The Method Creates Database 2.
4. The Method Opens Database 2 (using OpenDatabase Method).
6. The Method sets Database 2 as CurrentDb.
5. The Method creates (from vba code) various objects (i.e. imported tables, creates forms and reports, ect).
6. The Method sets Database1 as CurrentDb
7. The Method closes Database 2 and Sets it to Nothing.
Now, can it be done. Can you create a db on the fly (yes); but can you create objects in that db, without creating them in the original (Database 1) and then exporting them to Database 2
1. Open Database 1
2. Run a function / method.
3. The Method Creates Database 2.
4. The Method Opens Database 2 (using OpenDatabase Method).
6. The Method sets Database 2 as CurrentDb.
5. The Method creates (from vba code) various objects (i.e. imported tables, creates forms and reports, ect).
6. The Method sets Database1 as CurrentDb
7. The Method closes Database 2 and Sets it to Nothing.
Now, can it be done. Can you create a db on the fly (yes); but can you create objects in that db, without creating them in the original (Database 1) and then exporting them to Database 2