There are several problems...
One is that you are deleting more than "*" in your field list. Another is that you can't use DISTINCTROW in the DELETE statement. And finally, you are not joining to Duplicates_not_shown, so the delete is trying to delete from both [Main Table] and Duplicates_not_shown.
If you're using the query builder, you can get rid of the extra fields by removing the check from the "Show:" row of the superfluous fields. But that won't solve the problem.
I think what you'll have to do is use a SELECT query that will make a list of IDs that you want to keep in your [Main Table]. Then create another query that has a delete statement like this..
DELETE * From [Main Table] WHERE ID Not In (Select ID From [the query that has the IDs you want to keep])
For example, if Duplicates_not_Shown is actually a list of the [Main Table] records you want to keep, just change that query to select only the ID feild. Then the delete query is...
DELETE * From [Main Table] WHERE ID Not In (Select ID from Duplicates_not_Shown)
Hopefully you do have an ID field (primary key) defined in [Main Table] that is unique for each record in [Main Table]. If not, you have a tough row to hoe. But you can still do it by Joining [Main Table] with a list of the [Main Table] records that you DO want to delete.
Randall J Weers
Membership Vice President
Pacific NorthWest Access Developers Group