Delete Table with inner join

exaccess

Registered User.
Local time
Today, 02:57
Joined
Apr 21, 2013
Messages
287
Hello Experts,
I am trying to delete records from table1 that are also in table2. Table 1 = TransSHTbl, table2 = TransUPDSHTbl. The query I use is
Code:
DELSQL = "DELETE FROM TransSHTbl " & _
        " INNER JOIN TransUPDSHTbl ON " & _
        "((TransSHTbl.FirstName = TransUPDSHTbl.FirstName) AND " & _
        "(TransSHTbl.LastName = TransUPDSHTbl.LastName));"
 DoCmd.RunSQL DELSQL
If FirstNames and LastNames are equal then delete but it does not work. It says specify the table to delete and then I cannot delete this table. Help Please
 

Users who are viewing this thread

Back
Top Bottom