Copying records to another table

  • Thread starter Thread starter Canice Diaz
  • Start date Start date
C

Canice Diaz

I have a main form frmDepartment and a subform frmEmployees within the main
form with a one to many relationship - one department many employees. My
problem is to select one or more records from one department and copy to
another department. After copying I want to make the copied record(s)
inactive on the original department - sort of keeping audit trail history.
I haven't code anything yet and could not find a thread similar to my
request. I am a novice in VB. I appreciate any help from the experts.
Thanks for your help.

Canice
 
Canice

I guess you have a table which has fields like..
Department
EmployeeID
.... which describes which employee is assigned in which department.

It seems to me that to think in terms of copying a record from one
department to another can be a bit confusing. It seems to me that all
you need is to add a new record to this assignment tqble, so this will
be simply going on your main form to the record for the department you
want to add the employee to, and I guess on your employees subform you
have a combobox from which you can select the employee required, and
there you are!

As for making the employee assignment active/inactive, I suppose there
are various approaches to this. You could just put a Yes/No field into
the staff assignments table, which you can represent on your form with a
checkbox, and just tick/untick this box as required to indicate the
status of the employee within this department. But you mentioned an
"audit trail history", so you may in fact want to have a couple of
date/time fields instead, and record the date an employee starts in any
given department, and the date they leave or move to another department,
and in this case any record where the DateTo field is blank will
indicate "active".
 
Back
Top