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 / Forms Programming / March 2005

Tip: Looking for answers? Try searching our database.

remove records

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Yvonne - 31 Mar 2005 14:57 GMT
Hi I need to delete all records from a table in my
database.  I have a button on a table maintenance  form
which I would like to run the code from.  Only data
should be removed.

my table is tblplacenames

thanks

Yvonne
Nikos Yannacopoulos - 31 Mar 2005 15:15 GMT
Yvonne,

Put this code in the button's On Click event:

cnt = DCount("*", "tblplacenames")
strSQL = "DELETE * FROM tblplacenames"
CurrentDb.Execute strSQL
MsgBox cnt & " Records deleted.", vbInformation, "Place Names table"

HTH,
Nikos

> Hi I need to delete all records from a table in my
> database.  I have a button on a table maintenance  form
[quoted text clipped - 6 lines]
>
> Yvonne
 
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.