Delete codes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have a question. How can i merge these codes:

CurrentDb.Execute "DELETE * FROM Table 1"
CurrentDb.Execute "DELETE * FROM Table 2"
CurrentDb.Execute "DELETE * FROM Table 3"
 
Hi,
I have a question. How can i merge these codes:

CurrentDb.Execute "DELETE * FROM Table 1"
CurrentDb.Execute "DELETE * FROM Table 2"
CurrentDb.Execute "DELETE * FROM Table 3"

You can't. You're deleting records from 3 different tables. Where
did you get the notion that you could?
 
In the SQL, you can make it:

Delete Table1.*,Table2.*,Table3.* From Table1, Table2, Table3

So I thought maybe i can make this operation in VBA too. But not. Thanks
anyway.

Sorry for English...
 
In the SQL, you can make it:

Delete Table1.*,Table2.*,Table3.* From Table1, Table2, Table3

So I thought maybe i can make this operation in VBA too. But not. Thanks
anyway.

Sorry for English...

make a dummy database and try it. never heard of doing it like that.
I'd rather have multiple statements that I can understand/modify
easily... doesn't mean what you're trying can't be done.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Access Access VBA question 0
passing boolean variable value into SQL string 3
error on update table WHERE date comparison 0
Progress Meter 1
autonumber reset again 8
Table Refresh Storing backup? 1
Code Issues 5
sql strings 3

Back
Top