D
doyle60
I have a query that lists data that I wish to delete. The select query
allowed me to delete the data only if I put the word DISTINCTROW after
the word SELECT.
SELECT DISTINCTROW Categorytbl.*
FROM Categorytbl LEFT JOIN OrderHeader ON Categorytbl.CategoryID =
OrderHeader.CategoryID
WHERE (((OrderHeader.CategoryID) Is Null));
Without that word, I could not delete the data.
To change this query to a delete query, I usually stick it in a macro
(the name of the query being Sim200DeleteCategoryqry):
DELETE Sim200DeleteCategoryqry.*
FROM Sim200DeleteCategoryqry;
But I get the error: "Couldn't delete from specified tables." The
message, Error 3086, is about read-only business and permissions, which
just doesn't apply.
I'm only allowed to delete queries by this method if the link is to a
key field and the DISTINCTROW is not needed (see postings "How to allow
a Query to Delete Records").
So how do I make a workable delete query in a macro when it is based on
a query with DISTINCTROW?
Thanks,
Matt
allowed me to delete the data only if I put the word DISTINCTROW after
the word SELECT.
SELECT DISTINCTROW Categorytbl.*
FROM Categorytbl LEFT JOIN OrderHeader ON Categorytbl.CategoryID =
OrderHeader.CategoryID
WHERE (((OrderHeader.CategoryID) Is Null));
Without that word, I could not delete the data.
To change this query to a delete query, I usually stick it in a macro
(the name of the query being Sim200DeleteCategoryqry):
DELETE Sim200DeleteCategoryqry.*
FROM Sim200DeleteCategoryqry;
But I get the error: "Couldn't delete from specified tables." The
message, Error 3086, is about read-only business and permissions, which
just doesn't apply.
I'm only allowed to delete queries by this method if the link is to a
key field and the DISTINCTROW is not needed (see postings "How to allow
a Query to Delete Records").
So how do I make a workable delete query in a macro when it is based on
a query with DISTINCTROW?
Thanks,
Matt