Transferring data from one access program to another (1 Viewer)

aattas

Registered User.
Local time
Today, 17:38
Joined
Dec 24, 2014
Messages
74
Gents,
I have an access program having all the tables and queries and forms and subforms. I made a copy of the database and sent to a client to fill in the fields. After all the fields has been filled in, i needed all data from the copy database to be transferred to the original database . Is there a way to populate the data from a database to another mirror database. All the fields and subforms are the similar.
Thanks
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:38
Joined
May 7, 2009
Messages
19,242
use update query:

Code:
Const strOtherDB as String = "D:\downloaded.accdb"
Dim db As DAO.Database

Set db = Currentdb

db.Execute "Update [localTableName] As A Right Join [" & strOtherDB & "].ExternalTableName As B " & _
    "On A.pkField = B.pkField Set A.FieldToUpdate = B.FieldUpdate;"
 

aattas

Registered User.
Local time
Today, 17:38
Joined
Dec 24, 2014
Messages
74
Dear Arnelgp

Thanks for the prompt reply, can you be more clear how to make the update query. Im not that expert in this matter.

Thanks
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:38
Joined
May 7, 2009
Messages
19,242
on the code I gave, let "d:\downloaded.accdb" is the copy of your db that you have received after
your client sent it back to you.
so you change that to the right location and db name.

also the code will reside on the Original db.
copy and paste the code to New Module.
"localTableName" the table you have in the Orig db and ExternaTableName is the same tablename but
resides on the "d:\downloaded.accdb".

the code will Update old records from your table as well as Add New records.
 

Users who are viewing this thread

Top Bottom