I would like delete all the tables in other database
hello,
I would like your help about my problem.
I would like to delete all the tables in other database. I have try this but it doesn't work. I have two tables in ma database outwards the system tables and my code is block on the line Do.Cmd because he didn't find this two tables !!. Do you can help me.
Thanks
Keawee
hello,
I would like your help about my problem.
I would like to delete all the tables in other database. I have try this but it doesn't work. I have two tables in ma database outwards the system tables and my code is block on the line Do.Cmd because he didn't find this two tables !!. Do you can help me.
Code:
..
folder = Application.CurrentProject.Path
Set db = OpenDatabase(folder& "\RI Account.mdb")
For i = 0 To db.TableDefs.Count
If db.TableDefs(i).Name Like "MSys*" Then
Else
DoCmd.DeleteObject acTable, db.TableDefs(i).Name
End If
Next i
..
Thanks
Keawee