Updates to Include New Records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

We are a national company, and our office is not at the same location as the
General Office. They send me an electronic updated table on the 1st of each
month; this update includes any promotions, title changes, address changes
etc...
for each employee I have. Included in this update is the complete record
data for any new employees. I have to run an update query already to pick up
the changes to title, address etc... What I need to know is if there is some
way to get it to also update my table to include the new employee record? An
append query would try to re-create all 900 employees.
 
Create a query containing your original table, and the new table that you
have received.
Then make a link from your employee ID (PK) to the employee ID (PK) in the
new table.
Right click on the link between the two tables and select the option that
says show "Include all records from NEW TABLE NAME and only those from
ORIGINAL TABLE NAME where they are equal".

Now add all the fields from the NEW TABLE NAME to your query, and the
employee ID from the ORIGINAL TABLE NAME.
If you view the query at this stage you will see all records from your new
table, and in the last field we added (employee ID from the ORIGINAL TABLE
NAME) you will only see a value if its an employee you had in both tables.

Go back to design view and set the criteria for employee ID from the
ORIGINAL TABLE NAME to "is null"

Now your query just shows new records, now all you have to do is change the
query type to and append query, and append it to your ORIGINAL TABLE NAME.

Hope this helps, if not let me know and I'll create you an example.

P.S. Dont forget to make a backup before you start !

Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top