Create Archive Database

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

Guest

I have a personnel database for our Guard unit - One form is used to collect
all the data and another identical form is used to edit their record. When
someone retires, transfer to another unit I have a delete button to delete
the record.

Problem is some of the troops return to our unit and I have to recreate the
info.
What I have on my edit form is a list box that I scroll thru to select which
record I want to edit or delete - when I highlight their record is there a
way I can create a button to move that record to an archive database.

Thanks - George
 
Yes.
Create an Append Query that uses the record source of your form as the
append source. Make the destination the table where you want to archive the
record. It can be in another mdb file. Make the criteria for the primary key
of your record be the control on your form where the primary key is. If you
don't have the primary key as a control on your form, create one, but make
it's visible property = No.
Then you can execute the query in the Click event of the Delete button.
 
Thanks for the quick reponse...

Klatuu said:
Yes.
Create an Append Query that uses the record source of your form as the
append source. Make the destination the table where you want to archive the
record. It can be in another mdb file. Make the criteria for the primary key
of your record be the control on your form where the primary key is. If you
don't have the primary key as a control on your form, create one, but make
it's visible property = No.
Then you can execute the query in the Click event of the Delete button.
 
Back
Top