S
Southern at Heart
I'm needing to update a table in another database with data from a table in
the current database
I think I've figured out how to open the other database, like this:
....
Set dbsBook = DBEngine.Workspaces(0).OpenDatabase(strFileName)
....
I think I can open the table in it for editting, like this:
....
Set rst = dbsBook.OpenRecordset("tblName")
But Here's my problem. I'm needing to update it with data from a table in
the current database that I need joined to it before I know what to update.
I mean, I've got one table in the current database, and this tblName in the
other database, and they both have a Key, the field
the current database
I think I've figured out how to open the other database, like this:
....
Set dbsBook = DBEngine.Workspaces(0).OpenDatabase(strFileName)
....
I think I can open the table in it for editting, like this:
....
Set rst = dbsBook.OpenRecordset("tblName")
But Here's my problem. I'm needing to update it with data from a table in
the current database that I need joined to it before I know what to update.
I mean, I've got one table in the current database, and this tblName in the
other database, and they both have a Key, the field
Code:
which matches them
up. So I need to query them both via that Key, and open that as a recordset,
and then update the other database's table with data from the current
databases table.
I've opened a recordset using two tables in the current database like this:
....
strSql = "SELECT tbData.Name, tblContacts.HomeAddressStreet " & _
"FROM tbData, tblContacts " & _
"ORDER BY tbData.Name;"
Set rst = CurrentDb().OpenRecordset(strSQL)
....But I don't know how to do it when one table is in another database.
Is this possible?
Totally Stumped