Hello All Experts, Here's my latest question:
I have a table I use to store archived records, the records originate from two tables (they are joined on one of the fields).
This part works.
The SQL I use is:
Now my question is how do I reverse the above query, returning the records to their original tables?
I have a table I use to store archived records, the records originate from two tables (they are joined on one of the fields).
This part works.
The SQL I use is:
Code:
INSERT INTO tblHistory ( SellerID, Surname, FirstName, Phone, Cell, Fax, Email, SellerAddress, PropertyID, City, Neighborhood, Address, DateAdded, DateUpdated, DateArchived )
SELECT tblSellers.SellerID, tblSellers.Surname, tblSellers.FirstName, tblSellers.Phone, tblSellers.Cell, tblSellers.Fax, tblSellers.Email, tblSellers.Address, tblApartments.PropertyID, tblApartments.City, tblApartments.Neighborhood, tblApartments.Address, tblApartments.DateAdded, tblApartments.DateUpdated, Date() AS ArchivedDate
FROM tblSellers INNER JOIN tblApartments ON tblSellers.SellerID = tblApartments.SellerID
WHERE (((tblSellers.SellerID) Like [Forms]![frmRecordManagment]![SubDetails]![txtID])) OR (((tblApartments.PropertyID) Like [Forms]![frmRecordManagment]![SubApartments]![txtPropertyID]));
Now my question is how do I reverse the above query, returning the records to their original tables?