Hi Guys,
Im getting an error when when i apply a code to delete import error tables, here is the error:
Microsoft Office Access cant find the name 'DeleteImportErrTables' you entered in the expression.
You may have specified a control that was'nt on the current object without specifying the correct form or report context.
to refer a control on another form or report, precede the control name with the name of collection.................................
Here is the code: in the standard module
Function DeleteImportErrTables()
Dim z As Integer
Dim db As DAO.Database
Set db = CurrentDb
For z = db.TableDefs.Count - 1 To 0 Step -1
If InStr(1, db.TableDefs(z).Name, "ImportError") > 0 Then
DoCmd.DeleteObject acTable, db.TableDefs(z).Name
End If
Next z
End Function
I hope somebody can help....
Im getting an error when when i apply a code to delete import error tables, here is the error:
Microsoft Office Access cant find the name 'DeleteImportErrTables' you entered in the expression.
You may have specified a control that was'nt on the current object without specifying the correct form or report context.
to refer a control on another form or report, precede the control name with the name of collection.................................
Here is the code: in the standard module
Function DeleteImportErrTables()
Dim z As Integer
Dim db As DAO.Database
Set db = CurrentDb
For z = db.TableDefs.Count - 1 To 0 Step -1
If InStr(1, db.TableDefs(z).Name, "ImportError") > 0 Then
DoCmd.DeleteObject acTable, db.TableDefs(z).Name
End If
Next z
End Function
I hope somebody can help....