cant delete record from table, error 3128 MS Access

This query worked last year, but I've had the problem in two databases now this year.  The error message says I must specify the table to be deleted from, but I have done that.

SQL is...

DELETE DISTINCTROW particyear.*, Players.DelNow
FROM Players INNER JOIN particyear ON Players.ID = particyear.PlID
WHERE (((Players.DelNow)=Yes));

The attached jpeg show my problem.  The record I want to delete shows on a form, and I must confirm delete using "Delete Now"
Capture.JPG
NoGurruAsked:
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.

Gustav BrockCIOCommented:
Try with:

DELETE
FROM Players
INNER JOIN particyear ON Players.ID = particyear.PlID
WHERE (((Players.DelNow)=Yes));

/gustav
0
NoGurruAuthor Commented:
No, that didn't work, sorry.  It happens when there is a join in a delete query.  Using a hidden form, I can pass the ID to the delete query which has only the Players table in it.  That works, and that's what I will continue to do.

Thanx for the quick reply, and I did give it a try.  I just know I have to deal with delete queries differently.
0
Gustav BrockCIOCommented:
You could try:

DELETE
FROM Players
WHERE Players.DelNow=Yes AND
Players.ID IN (Select ID From particyear);

/gustav
0
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

Jeffrey CoachmanMIS LiasonCommented:
It would seem that the "Yes" is a string, ...so try this too:

DELETE DISTINCTROW particyear.*, Players.DelNow
FROM Players INNER JOIN particyear ON Players.ID = particyear.PlID
WHERE (((Players.DelNow)="Yes"));

(Also I don't think you need DisticntRow, ...but I could be wrong, depending on exactly what you need here...)
0
Gustav BrockCIOCommented:
Or perhaps just:

Players.DelNow=True

/gustav
0
NoGurruAuthor Commented:
I've requested that this question be deleted for the following reason:

It appears that Access 2007 won't delete when there is a joined table.  None of the SQL suggestions worked when I had the joined tables.  I don't work in SQL, I work in QBE, but the only answer seems to be redesign so you have only one table in a delete query.

Thanx for all the suggestions.
0
Gustav BrockCIOCommented:
I guess you just wish to delete the record, so why the join?
Did you really check this:

DELETE
FROM Players
WHERE Players.DelNow=True AND
Players.ID IN (Select ID From particyear);

/gustav
0
NoGurruAuthor Commented:
The problem was the "Delete Now" is in the "Players" table, and it is a record with the same ID in the "ParticYear" table I wanted to delete.
0
Gustav BrockCIOCommented:
That was not easy to guess.
Then it should be:

DELETE
FROM particyear
WHERE PlID IN (Select ID From Players Where DelNow = True);

/gustav
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
NoGurruAuthor Commented:
It brings us back to only one table in the query, and it works.

Thanx
0
Gustav BrockCIOCommented:
You are welcome!

/gustav
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.