Can not delete from specified Tables

C

c8tz

Below is my SQL Code - Confirmation Entries such that if PalmHeight1 =
PalmHeight2 then Delete that entry in the second table.


DELETE PalmHeight.Height, PalmHeightSecond.*, PalmHeight.RDate
FROM PalmHeight INNER JOIN PalmHeightSecond ON (PalmHeight.Palm =
PalmHeightSecond.Palm) AND (PalmHeight.Plot = PalmHeightSecond.Plot)
AND (PalmHeight.Trial = PalmHeightSecond.Trial)
WHERE (((PalmHeight.Height)=[PalmHeightSecond].[Height]) AND
((PalmHeight.RDate)=[PalmHeightSecond].[RDate]));

Am not able to delete.
Trial, Palm, Plot and Date is related.

Is this where the problem is? Such that there are too many relations
and am only dealing with one entry item (Palm Height).

If so, how can I split this query and still get the same result.

Thanks in advance,

Lost!
 
T

Trevor via AccessMonster.com

Try:

DELETE DISTINCTROW PalmHeight.*
FROM PalmHeight INNER JOIN PalmHeightSecond ON (PalmHeight.Palm =
PalmHeightSecond.Palm) AND (PalmHeight.Plot = PalmHeightSecond.Plot)
AND (PalmHeight.Trial = PalmHeightSecond.Trial)
WHERE (((PalmHeight.Height)=[PalmHeightSecond].[Height]) AND
((PalmHeight.RDate)=[PalmHeightSecond].[RDate]));




Below is my SQL Code - Confirmation Entries such that if PalmHeight1 =
PalmHeight2 then Delete that entry in the second table.

DELETE PalmHeight.Height, PalmHeightSecond.*, PalmHeight.RDate
FROM PalmHeight INNER JOIN PalmHeightSecond ON (PalmHeight.Palm =
PalmHeightSecond.Palm) AND (PalmHeight.Plot = PalmHeightSecond.Plot)
AND (PalmHeight.Trial = PalmHeightSecond.Trial)
WHERE (((PalmHeight.Height)=[PalmHeightSecond].[Height]) AND
((PalmHeight.RDate)=[PalmHeightSecond].[RDate]));

Am not able to delete.
Trial, Palm, Plot and Date is related.

Is this where the problem is? Such that there are too many relations
and am only dealing with one entry item (Palm Height).

If so, how can I split this query and still get the same result.

Thanks in advance,

Lost!
 
C

c8tz

Hi Trevor,

Thanks for your reply,

I am now getting runtime error '3008'. The table "PalmHeight" is
already opened exclusively by another user or it is already opened
through the user interface and can not be manipulated
programmatically.

The tables are "links" into the Interface Application. Would this be
the cause? But I've had other entry forms set up similar and it seems
ok -

Please help,

Thanks,

ccholai



Try:

DELETE DISTINCTROW PalmHeight.*
FROM PalmHeight INNER JOIN PalmHeightSecond ON (PalmHeight.Palm =
PalmHeightSecond.Palm) AND (PalmHeight.Plot = PalmHeightSecond.Plot)
AND (PalmHeight.Trial = PalmHeightSecond.Trial)
WHERE (((PalmHeight.Height)=[PalmHeightSecond].[Height]) AND
((PalmHeight.RDate)=[PalmHeightSecond].[RDate]));




Below is my SQL Code - Confirmation Entries such that if PalmHeight1 =
PalmHeight2 then Delete that entry in the second table.
DELETE PalmHeight.Height, PalmHeightSecond.*, PalmHeight.RDate
FROM PalmHeight INNER JOIN PalmHeightSecond ON (PalmHeight.Palm =
PalmHeightSecond.Palm) AND (PalmHeight.Plot = PalmHeightSecond.Plot)
AND (PalmHeight.Trial = PalmHeightSecond.Trial)
WHERE (((PalmHeight.Height)=[PalmHeightSecond].[Height]) AND
((PalmHeight.RDate)=[PalmHeightSecond].[RDate]));
Am not able to delete.
Trial, Palm, Plot and Date is related.
Is this where the problem is? Such that there are too many relations
and am only dealing with one entry item (Palm Height).
If so, how can I split this query and still get the same result.
Thanks in advance,
 
Top