M
Maria
Hi!
This has problably been up before... I treid searching i previos posts
but I couldn't find an answer to my problem.
I have a database consisting from a few related tables. My whole
database works as a file registry to keep track of a large number of
symbols on my computer. There´s the main table with the ID set as
primary key and some descriptive words about every symbol.
Then theres other tables containing hyperlinks to the related files on
each symbol.
I want to make a delete query that deletes the symbol from the main
table and also all the related fields containing the files and other
data.
I have created a query that looks like this:
DELETE [Huvudtabell-Symboler].ID, [Huvudtabell-Symboler].*,
Bildoriginal.*, Sökordskoppling.*, Stenciler.*, [PDF-er].*
FROM ((([Huvudtabell-Symboler] LEFT JOIN Sökordskoppling ON
[Huvudtabell-Symboler].ID = Sökordskoppling.ID) INNER JOIN [PDF-er] ON
[Huvudtabell-Symboler].ID = [PDF-er].ID) LEFT JOIN Bildoriginal ON
[Huvudtabell-Symboler].ID = Bildoriginal.ID) LEFT JOIN Stenciler ON
[Huvudtabell-Symboler].ID = Stenciler.ID
WHERE ((([Huvudtabell-Symboler].ID)=136));
When I try to run the query I get the error message "Can not delete
data from specified tables". In some earlier post I saw that it could
be the result from a lack of primary keys although I have the ID as a
primary key in the main tables but I can't have the ID as a primary key
in the rest of the tables because there's duplicates, several fields
with the same ID.
Any ideas are welocome!
This has problably been up before... I treid searching i previos posts
but I couldn't find an answer to my problem.
I have a database consisting from a few related tables. My whole
database works as a file registry to keep track of a large number of
symbols on my computer. There´s the main table with the ID set as
primary key and some descriptive words about every symbol.
Then theres other tables containing hyperlinks to the related files on
each symbol.
I want to make a delete query that deletes the symbol from the main
table and also all the related fields containing the files and other
data.
I have created a query that looks like this:
DELETE [Huvudtabell-Symboler].ID, [Huvudtabell-Symboler].*,
Bildoriginal.*, Sökordskoppling.*, Stenciler.*, [PDF-er].*
FROM ((([Huvudtabell-Symboler] LEFT JOIN Sökordskoppling ON
[Huvudtabell-Symboler].ID = Sökordskoppling.ID) INNER JOIN [PDF-er] ON
[Huvudtabell-Symboler].ID = [PDF-er].ID) LEFT JOIN Bildoriginal ON
[Huvudtabell-Symboler].ID = Bildoriginal.ID) LEFT JOIN Stenciler ON
[Huvudtabell-Symboler].ID = Stenciler.ID
WHERE ((([Huvudtabell-Symboler].ID)=136));
When I try to run the query I get the error message "Can not delete
data from specified tables". In some earlier post I saw that it could
be the result from a lack of primary keys although I have the ID as a
primary key in the main tables but I can't have the ID as a primary key
in the rest of the tables because there's duplicates, several fields
with the same ID.
Any ideas are welocome!