This topic is locked

Move a record to specific table when filling a form

10/6/2008 12:57:18 PM
ASPRunnerPro General questions
J
johnnyhomelus author

Hi, i have a databse that keep record for employees in ASP, originaly create in Accees 2003 i use Asp Prorunner 5 to convert it to ASP,
There a fill form for emplyees , having their personnal and work info, also determinating if the are Active or passive, fired or not fired
I would like to be able to have a form move to a table named Archives_data when i'm filling a form telling that : this employee is Passive or Fired
COULD i create other table also like Archives_fired_employees when i'm filling a form where a employee in fired that that form could be found only on that table name Archives_fired_employees
How do i do please, do i do that in access 2003 first or do i write a code when i'm in ASP
Thank for answering me @ johnyhomelus@hotmail.com

Sergey Kornilov admin 10/7/2008

As first step you need to add a new table named Archives_fired_employees to MS Access database.
Then you need to implement BeforeEdit event where you can check status field value and move record to another table.

if dict("status")="Fired" or dict("status")="retired" then

...

' insert a new record into archive table

...

' delete record in original table

...

end if