Macro to delete records in a table...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a macro that emptys a table, before repopulating the table with append
queries. What is the best way to have a macro empty a table?

Currently I am using the sendkeys command to select all records and then
delete. This works, however there are problems with this when the user
changes active windows while the macro is running.
 
Create a delete query that will delete the records in that table. Save it.

Then use OpenQuery action in macro to run that query.

If you want to avoid the "warning: you're about to delete....." message,
precede the OpenQuery action with SetWarnings action (set the argument to
No).
 
Back
Top