|
Question : VBA for Updating Table Data
|
|
I'd like to update one table in my database with data from an identically structured table from another database using VBA, but track any changes in the destination database.
Anybody have some code I can pilfer? Thanks!
mv
|
|
Answer : VBA for Updating Table Data
|
|
see this link
How to create an audit trail of record changes in a form http://support.microsoft.com/?kbid=197592
for the updating of the table in the other db
Sub UpdateOtherTable() Dim dbPath As String, accDb As DAO.Database
Set accDb = OpenDatabase(CurrentProject.Path & "\db2.mdb") accDb.Execute "Update Table1 set Field1='SomeValue' where ID = " accDb.Close Set accDb = Nothing
End Sub
|
|
|