Append, Delete - data loss safeguard (1 Viewer)

PaulC999

New member
Local time
Today, 03:13
Joined
Apr 18, 2002
Messages
6
Can anyone tell me if it is possible to ensure that one part of a macro or code is executed before it starts on another part of sequence.

I want to append data automatically from one table to another when a job is completed and then delete it from the first table.

I am worried that if something should go wrong I might loose the data if the append did not complete

Any advice on building in a safeguard would be appreciated. If I use a DoCmd code can I ensure that a specific sequence is followed?

Thanks in advance

Paul C
 

Jack Cowley

Registered User.
Local time
Today, 03:13
Joined
Aug 7, 2000
Messages
2,639
I think I would not transfere data from one table to another and then delete it from the first table. I would add a Yes/No field to the first table and call it Archive, or whatever, and instead of moving the data just check the Yes/No field. A query or two will take care of showing the 'moved' data or not. This way you do not have to worry about code sequence or losing data in the proccess...
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 22:13
Joined
Feb 19, 2002
Messages
43,560
If you "must" delete the data, delete yesterdays data and then append todays data. That way you're sure that the append has happened before you delete the old data.
 

PaulC999

New member
Local time
Today, 03:13
Joined
Apr 18, 2002
Messages
6
Thanks to both for your input.

The necessity for this procedure is that core data is being automatically placed on a remote database. The data is used for a few hours during which time it will be updated.

After this the data needs to be removed and stored centrally to provide statistical analysis and provide a data source via an intranet web application.

Thanks again

Paul C
 

Users who are viewing this thread

Top Bottom