Delete Records In Table

GregSmith

Registered User.
Local time
Today, 14:58
Joined
Feb 22, 2002
Messages
126
I have a table called servers that I import data into.
After you exit the database, I would like to delete all the records from the servers table.

Any ideas on how to do this? Code examples would be great!!

Thanks in advance...
 
Here is the code:

DoCmd.RunSQL "Delete FROM [YourTableName]"
 
When I need to delete multiple records I use a delete query. Then you can use this code:

DoCmd.OpenQuery "QueryName"
 
Does any know how to do a compact and repair database within VBA Code?
 

Users who are viewing this thread

Back
Top Bottom