Better Way to Delete Import Error Tables?
From: Bill Sturdevant (BillSturdevant_at_discussions.microsoft.com)
Date: 01/30/05
- Next message: bart van deun: "conditional formatting for birthday date"
- Previous message: Timbuck2: "RE: How do I go to the last record on a subform"
- Next in thread: Douglas J. Steele: "Re: Better Way to Delete Import Error Tables?"
- Reply: Douglas J. Steele: "Re: Better Way to Delete Import Error Tables?"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 30 Jan 2005 07:13:01 -0800
I am using the routine below to delete Import Error tables. Because of the
number of tables in the database, it takes quite a while. Is there a better
way? Perhaps some way of saying: "For Each tbl In cat.Tables tbl.Name Like
'*$_ImportErrors*' "?
Private Sub Delete_Import_Error_Tables()
On Error GoTo Delete_Import_Error_Tables_Error_Recovery
Dim cat As ADOX.Catalog
Dim tbl As ADOX.Table
Set cat = New ADOX.Catalog
cat.ActiveConnection = CurrentProject.Connection
For Each tbl In cat.Tables
If tbl.Name Like "*$_ImportErrors*" Then
DoCmd.DeleteObject acTable, tbl.Name
End If
Next tbl
Delete_Import_Error_Tables_Error_Recovery:
Exit Sub
End Sub
- Next message: bart van deun: "conditional formatting for birthday date"
- Previous message: Timbuck2: "RE: How do I go to the last record on a subform"
- Next in thread: Douglas J. Steele: "Re: Better Way to Delete Import Error Tables?"
- Reply: Douglas J. Steele: "Re: Better Way to Delete Import Error Tables?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|