Hi all,
I'm trying to delete a table from my db.
When I try to execute this code it returns a message saying: "The query cannot be used as row source". I'd like to learn why...
I'm trying to delete a table from my db.
When I try to execute this code it returns a message saying: "The query cannot be used as row source". I'd like to learn why...
Code:
Dim cat As ADOX.Catalog
Dim cmd As ADODB.Command
' Catalog settings
Set cat = New ADOX.Catalog
cat.ActiveConnection = CurrentProject.Connection
' Delete table
Set cmd = cat.Procedures("droptest").Command
cmd.Execute