yeubongdo01 > 14-06-12, 03:04 PM
Xuân Thanh > 14-06-12, 03:33 PM
Function DelTable()
Dim strTabName As String
Dim n As Integer
For n = 1 To CurrentDb.TableDefs.Count
strTabName = CurrentDb.TableDefs(n).Name
DoCmd.DeleteObject , acTable, strTabName
Next
End Function
yeubongdo01 > 14-06-12, 03:59 PM
haquocquan > 14-06-12, 04:31 PM
yeubongdo01 > 14-06-12, 04:47 PM
yeubongdo01 > 15-06-12, 10:17 AM
itnamdinh > 15-06-12, 11:05 AM
haquocquan > 15-06-12, 11:18 AM
Sub DelLinkTable()
Dim r As Recordset
Dim s As String
s = "SELECT ForeignName FROM MSysObjects WHERE ForeignName Is Not Null"
Set r = CurrentDb.OpenRecordset(s)
If r.RecordCount > 0 Then
r.MoveFirst
Do Until r.EOF
DoCmd.DeleteObject , acTable, r!ForeignName
r.MoveNext
Loop
End If
r.Close
Set r = Nothing
End Sub
yeubongdo01 > 15-06-12, 05:32 PM