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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

second part - see "opening a database within an open database" below

Status
Not open for further replies.
Jul 8, 2002
61
US
Is there a way to 'link' to that table in the other database using code? here's what has to happen: the user clicks a command button, a common dialog opens asking the user to find the database where the other table will be coming from. this path then gets stored to a variable that i want to use as the path to open the database (I've done this part already). What I now need to do is -in code- open that database, select the table, and copy the table to the current database. Then, I am going to append certain fields from that table that was just copied over, to another table in the current database. Basically, what Im trying to do is go out and grab last year's database, copy "TestData" (table) from last year, to this year's database. Im then going to append certain fields from last year's "TestData" to this year's "TestData" so I can make certain comparison's between the data. I hope the background info helps...

PS thanks for the help so far...
 
Here is the code I used to open a second Access Project, I imagine the code is similar for an Access MDB.

' Open Access project.
pubFilePath = "C:\Test\projects\localpubs.adp"
Set pubAppAccess = New Access.Application
pubAppAccess.OpenAccessProject pubFilePath

pubAppAccess.Application.RefreshDatabaseWindow
pubAppAccess.Application.Visible = True
DoCmd.Close '- closes current db
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top