Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opening a database within another database

Status
Not open for further replies.
Jul 8, 2002
61
US
Here's what I'm trying to do... I have a database that needs to be updated to include a table from another database. Right now I'm just importing the table manually by going to ...Get External Data... and then using the import wizzard. Is there a way to open a database from an already open database, then copy a table over to the current database in code? Let me know if this doesn't make sense and I'll try to explain it better... Thanks for any help.
 
You can LINK to the other database and tables

Instead of "Import" click "LINK"

Then you can use that table like you are doing now except the data is going to be live and update as it changes in the original database. DougP, MCP
 
As DougP said, you can link it. With it linked, it will always be updated with the other db's info. It will also update the table in the other db when you edit in the current db.

If you really want to import it, here's the code:
DoCmd.TransferDatabase acImport, &quot;Microsoft Access&quot;, <other db>, acTable, <source tblname>, <destination tblname>, False

Look up TransferDatabase in Help for more info.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top