Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete records via Macro? 2

Status
Not open for further replies.

GaborH

Technical User
Nov 5, 2003
48
US
I have a source table that updates a monthly log table. How can the records in the source table be deleted after the update procedure? If I remember, there used to be a way to do this via a macro command.
 
1. Make a delete query that deletes all the records in the source table.

2. Add a line to the end of your macro: "OpenQuery" -> on your new delete query.


I believe this is what you're looking for.
 
Make a copy of your update query then change the query type to delete.

In a macro if you need to you can then do an openquery action to run the delete query.

In code it would be a Docmd.OpenQuery


HTH,

Steve
 
Thank you!

I just could not find a good example of how these two commands should be used.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top