-
Hi guys is there a way to delete multiple table in a single command or any other sugestion?? THKS.
The code for delete one table is as follow:
Dim db As Database
Dim sql As String
Set db = OpenDatabase("c:\p1\data.mdb")
sql = "delete from ACC"
db.Execute sql
Is there another way whereby i could add in a single command line into to above to delete
another table??
e.g:
Dim db As Database
Dim sql As String
Set db = OpenDatabase("c:\p1\data.mdb")
sql = "delete from ACC"
sql = "delete from eACC"
db.Execute sql
-
Action Query:
Dim db As Database
Set db = Workspaces(0).OpenDatabase("c:\Wherever\Wherever\Database.mdb")
db.Execute "DELETE * FROM Table1"
db.Execute "DELETE * FROM Table2"
db.Close
Set db = Nothing
Hope this helps...........
--Steph
------------------
Email: [email protected]
"Face Down In The Warm Cabo Sand"
[This message has been edited by Off2Cabo (edited 10-08-1999).]
-
If you've set relationships with cascading deletes and the second table's records match the relationship properties then the seond tables's realted records could "automatically" be deleted.
If not each table gets it's own DELETE query.
------------------
http://www.smithvoice.com/vbfun.htm
-