Deleting Row after Appending to Archive Table

  • Thread starter How do you clear a report of data after
  • Start date
H

How do you clear a report of data after

I would like to delete a row from the table after it has been appended to the
archive table
 
M

Michel Walsh

Make two queries, one to append, one to delete. You can use VBA code to
define a 'method' which will do the append then delete, eventually inside a
transaction, so calling the said user defined VBA method will do the two
queries, in sequence, for you, 'as if' it was just one command.


Vanderghast, Access MVP



"How do you clear a report of data after"
 
A

Allen Browne

The safe way to do this is to wrap the whole thing in a transaction, so you
can an all-or-nothing result.

Details in:
Archive: Move records to another table
at:
http://allenbrowne.com/ser-37.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

"How do you clear a report of data after"
 
T

Tom van Stiphout

On Tue, 12 May 2009 05:54:01 -0700, How do you clear a report of data
after <[email protected]>
wrote:

If you can write an Append query, I'm sure you can write a Delete
query.
Run both of them in VBA, not in macros, so you can run them in a
Transaction.

-Tom.
Microsoft Access MVP
 
H

How do you clear a report of data after

Thank you for your reply I have down loaded what you suggested the problem I
have is I 'am a complete beginner to VBA and I 'am not sure were to put
anything.
the name of table is :
Core_Business_Quarter_1 - my yes/no box's are labeled as follows
Completed_1, Completed_2, Completed_3, Completed_4, Completed_5, Completed_6
also would I have to put the column names as well.
Please can you point me in the right direction
 
A

Allen Browne

The code goes into a standard module.

You will need to modify the SQL string to reflect the statement you need.
Perhaps you can mock up an Append query and switch it to SQL view to get an
example of the SQL statement you need.

You will need some understanding of VBA code to achieve this.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

"How do you clear a report of data after"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top