Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Delete all records in a table using ADO 1

Status
Not open for further replies.

gohym

Technical User
Jul 22, 2003
36
SG
Hi,

I have a table, "Temp", that contains some temporary information; it has only 1 field called "CSIID" . The CSIID is shown on a form and I want all the table's records to be deleted, once the form closes... preferably not using DAO...

Can someone please provide some guidance... time is pretty tight... need all the help I can get... Thanks!!
 
On Close of form run this code:

Dim stQuery As String

stQuery = "DELETE * FROM Temp"

DoCmd.SetWarnings False
DoCmd.RunSQL stQuery
DoCmd.SetWarnings True

HTH
Mike

[noevil]
 
Hi Mike,

Let me give it a try and get back to you... Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top