Microsoft Access 2007. Delete selecting from multiple tables

why am I receiveng this error message when i try execute the query below even though I am able to switch to the dataView in access and see the records .
The tables exsists.


Delete x.*
from gimecontacts as X
inner join aa1123 as Y
On y.[email address] = x.email_address
WHERE y.[first name]  = x.first_name and y.[last name] = x.last_name and
 y.gime_id =x.primary_organization_id

ERROR MESSAGE : could not find specified tabe
wademiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
I tried to emulated a similar query with the table alias's and the Join ... and I got a similar message.  Without the joins, no error message.

Not sure what's going on ...

mx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
luconstaCommented:
0
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
If you change this to a Select, does it return the records you indicate?

You might try changing the Join type. In the query, right click on the line joining the two tables. Make sure you are returning the correct records, then try it again.

0
phhCommented:
Please try to add DISTINCTROW after DELETE, i.e:

Delete Distinctrow x.*
from gimecontacts as X
inner join aa1123 as Y
On y.[email address] = x.email_address
WHERE y.[first name]  = x.first_name and y.[last name] = x.last_name and
 y.gime_id =x.primary_organization_id
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Yes, DISTINCTROW should work ... forgot about that ...

mx
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.