Crating a Macro or button to move record

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
 
W

Wayne-I-M

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
 
A

Ahmed Fathi

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
 
W

Wayne-I-M

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
 
J

John W. Vinson

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.
 

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

Top