Deceased People

  • Thread starter Thread starter Karlos
  • Start date Start date
K

Karlos

I want to have a table full of people. when they are
deceased i would record that.

how could i set it up so that as soon as someone is
deceased, they move automatically from the normal table to
another table just for deceased people
 
Add a field called (say) DeceasedDate.
It's blank while the person is alive, so set the RecordSource of your normal
forms to:
SELECT * FROM MyTable WHERE DeceasedDate Is Null;

If you want to move the records to another table, you could do that with a
pair of action queries to Append to the other table, and then a Delete query
to remove from this table. Details on a safe way to do this in article:
Archive: Move records to another table
at:
http://allenbrowne.com/ser-37.html
 
One way to do it, you would have to write a script or
macro (in ASP, PHP or whatever). The logic would go
something like this.....

Search for and retrieve the users details based on
identifying criteria (eg ID number etc)

Write that information to the deceased database,
Delete that user from the "live" database.
-----------------
A different approach would be to have only 1 database
with all the users that has a "status" type field at the
end that can contain 2 values, eg "living" and "deceased".
Then when a user dies, you just write a script to change
that field from living to deceased.
 
Hi,

Ive created the Deceased Date field and have also created 2
action queries. 1 that appends the decased people to the
deceased table and another that removes them from the
orignal table.

I have also created a macro that does them both in the
correct order to avoid accidently deleting before moving.

Is there anyway I can set up this macro to auto run when I
close the main table down. This way, as the deceased dates
get entered, access will move and delete them automatically
without me having to remember to run the macro.

thanks in advance
 
Why move them? Just mark them as deceased and then exclude them from your
queries, forms, and reports.

Rick B

I want to have a table full of people. when they are
deceased i would record that.

how could i set it up so that as soon as someone is
deceased, they move automatically from the normal table to
another table just for deceased people
 
See the article suggested.

Run the code in the AfterUpate event procedure of the form, if [Deceased
Date] is not Null.
 
Back
Top