Hallo I have a code that ignores the "On Error Go To". This is the situation:
if the table is not present in the database, it will raise the error "Item not found in the collection". I would expect the function to continue because I declare that On Error it should just try the next value. But this does't happen: this function will cause a crash.
Any idea?
Thanks
Code:
Private Sub deleteTables()
Set m_db = CurrentDb
Dim i As Integer
For i = 0 To UBound(m_tableName)
On Error GoTo Err_DeleteTable
m_db.TableDefs.Delete m_tableName(i)
Err_DeleteTable:
Next
End Sub
if the table is not present in the database, it will raise the error "Item not found in the collection". I would expect the function to continue because I declare that On Error it should just try the next value. But this does't happen: this function will cause a crash.
Any idea?
Thanks