# Miscellaneous > Database Design >  Macro to delete records in table

## Sylvia Delgado

I am trying to develop a macro in Microsoft Access 97 to delete all records within a table. I am having trouble developing it can someone help

----------


## Darryl Caillouet

Macro:
SetWarnings - No
RunSQL - DELETE FROM tablename
SetWarnings - Yes

VBA code:
DoCmd.SetWarnings False
DoCmd.RunSQL &#34;DELETE FROM tablename&#34;
DoCmd.SetWarnings True


------------
Sylvia Delgado at 11/20/2001 9:00:37 AM

I am trying to develop a macro in Microsoft Access 97 to delete all records within a table. I am having trouble developing it can someone help

----------

