Crating a Macro or button to move record

  • Thread starter Thread starter Ahmed Fathi
  • Start date Start date
A

Ahmed Fathi

I'm having an MS Access 2007 database for employees and every thing is going
ok but what i want to do now is when a person is promoted or terminated i
want to overwrite his data and keep a history record for him in another table
where the record will be identical to the main record before the update.
in other words i want to copy the old data automatically by pressing 1
button before i update his information.
Is it applicable to be done in MS Access or not? and how?
Many Thanks and Best regards
 
Hi

Copy the table containing the records you want to copy (structure only).
Create an update query that adds records from the old table to the new
Add a query by form criteria
Create a button on your form to run the query
 
Thanks for your response but i want to know what's the update query and how?
and how to add query by form criteria?
Thanks
 
HI

sorry I am just leaveing for the day. I think someone else will answer

Or you could try to use F1 for information on both update querries and query
by form. They are both very simple
 
I'm having an MS Access 2007 database for employees and every thing is going
ok but what i want to do now is when a person is promoted or terminated i
want to overwrite his data and keep a history record for him in another table
where the record will be identical to the main record before the update.
in other words i want to copy the old data automatically by pressing 1
button before i update his information.
Is it applicable to be done in MS Access or not? and how?
Many Thanks and Best regards

I would suggest a different approach. Simply add a yes/no field named Active
to the table, with a default value of True; base your forms and combo boxes on
a query selecting only Active=True records. To "remove" an employee from the
table simply uncheck the Active checkbox.
 
Back
Top