Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / November 2006

Tip: Looking for answers? Try searching our database.

Delete records in a table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
K - 22 Nov 2006 22:12 GMT
Good day,

How do I delete all the records in a table without deleting the table itself
via Macro.

Thanks in advance
Douglas J. Steele - 22 Nov 2006 22:23 GMT
CurrentDb.Execute "DELETE FROM MyTable", dbFailOnError

(replace MyTable with the actual table name)

(Note that if you have referential integrity turned on, you have to ensure
that you delete the data in the correct order)

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

> Good day,
>
[quoted text clipped - 3 lines]
>
> Thanks in advance
K - 22 Nov 2006 23:05 GMT
Thanks for the response. All I did that worked for me was created a Delete
Query. Simple and quick.

Cheers

> CurrentDb.Execute "DELETE FROM MyTable", dbFailOnError
>
[quoted text clipped - 10 lines]
> >
> > Thanks in advance
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.