G Guest Jan 23, 2004 #1 What is the best way to empty several tables in VBA. I'm writing a conversion routine and need to do this when I do a rerun.
What is the best way to empty several tables in VBA. I'm writing a conversion routine and need to do this when I do a rerun.
A Allen Browne Jan 23, 2004 #2 Supply your table names to this kind of routine: Dim strTable As String Dim db As DAO.Database strTable = "[MyTable]" dbEngine(0)(0).Execute "DELETE FROM " & strTable & ";", dbFailOnError -- Allen Browne - Microsoft MVP. Perth, Western Australia. Reply to group, rather than allenbrowne at mvps dot org. David said: What is the best way to empty several tables in VBA. I'm writing a Click to expand... conversion routine and need to do this when I do a rerun.
Supply your table names to this kind of routine: Dim strTable As String Dim db As DAO.Database strTable = "[MyTable]" dbEngine(0)(0).Execute "DELETE FROM " & strTable & ";", dbFailOnError -- Allen Browne - Microsoft MVP. Perth, Western Australia. Reply to group, rather than allenbrowne at mvps dot org. David said: What is the best way to empty several tables in VBA. I'm writing a Click to expand... conversion routine and need to do this when I do a rerun.