Link to home
Start Free TrialLog in
Avatar of mloricha
mloricha

asked on

Macro that will clear data from table

Hi experts,
I need a way to clear records from a data table (maybe a macro) - intended to use as a rollover of a database for a new cycle.  More than one table needs to be cleared, so I'm guessing a separate macro would be needed for each table - or can this be achieved with just one process?
ASKER CERTIFIED SOLUTION
Avatar of Mike Eghtebas
Mike Eghtebas
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ryan
If this is an occasional thing, you could just open each table, select All (Ctrl + A) and delete.

Careful about deleting data from tables, its kind of permanent, don't make a button too easy and without plenty of warning.
Avatar of mloricha
mloricha

ASKER

Home eghtebas.  Works a treat (and thanks for the tip re table with many.
Best regards, Lisa
My pleasure.

Also, for future reference:

CurrentDB.Execute "Delete * From [C:\Folder1\TestFile.mdb].[Tabl1]"
                                               
could be executed to manipulate TestFile.mdb remotely.

Mike