J
Joel Wiseheart
I use the following code to delete all records in a table
through VBA code. The problem is that since the table
contains over 47,000 records, it takes 3 minutes to run.
Is there a faster way to delete all these records?
Dim db As DAO.Database
Dim rstNew As DAO.Recordset
Set db = CurrentDb
Set rstNew = db.OpenRecordset("t_SOWOShortTrackComments")
With rstNew
If .RecordCount > 0 Then
.MoveFirst
Do
.Delete
.MoveNext
Loop Until .EOF
End If
End With
through VBA code. The problem is that since the table
contains over 47,000 records, it takes 3 minutes to run.
Is there a faster way to delete all these records?
Dim db As DAO.Database
Dim rstNew As DAO.Recordset
Set db = CurrentDb
Set rstNew = db.OpenRecordset("t_SOWOShortTrackComments")
With rstNew
If .RecordCount > 0 Then
.MoveFirst
Do
.Delete
.MoveNext
Loop Until .EOF
End If
End With