Full Version: Copying data acrossed
UtterAccess Forums > Microsoft® Access > Access Forms
aung
Hi all,
Hope you are all well. I have got two tables: tblprofile1 & tblprofile2. Both have same attributes: ID & Note. I am just wondering is there a way to transfer the data from tblprofile1 to tblprofile2 if the ID number is not existed in tblprofile2 by a click of a button?
Many thanks in advance.
Regards,
dashiellx2000
Why would you need to do this? Having two tables with the exact same attributes would indicate a normalization issue with your database. Can you explain a bit more about what you are trying to do?
aung
Hi,
Thanks for your reply. tblProfile2 is in the main database and the database with tblProfile1 is the one we send out to our field staff. Every week, we need to update the field data into the main database hence having two tables one is in the main database and the other one being linked access to it.
Hope it makes sense.
Thanks,
dashiellx2000
OK, then use an Append Query sort of like:
!--c1-->
CODE
INSERT INTO tblProfile2 (ID, Note)
SELECT tblProfile1.ID, tblProfile1.Note
FROM tblProfile1 LEFT JOIN tblProfile2 ON (tblProfile1.ID = tblProfile2.ID)
WHERE tblProfile2.ID Is Null

HTH.
aung
Hi there,
Thanks for your help. I will go and test it out.
Cheers
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.