Delete query

  • Thread starter Thread starter Sirocco
  • Start date Start date
S

Sirocco

Anybody know how to make a delete query? I've been making them for years
and suddenly they don't run for me, I get an error message saying "Can't
delete records". Is the delete query "special" in some way.

Many thanks in advance
 
Anybody know how to make a delete query? I've been making them for years
and suddenly they don't run for me, I get an error message saying "Can't
delete records". Is the delete query "special" in some way.

Many thanks in advance

A Delete query must use an updateable query. Can you run ANY delete
queries, i.e. can you create a new table named Foo, fill it with a few
records, and then run a query like this?

DELETE * FROM Foo;

If not, there's something seriously wrong.

If it's some specific query which you cannot turn into a delete, read
the online help on "Updateable" and/or post the SQL of the query.
 
If you use Joins in a Delete Query, i.e. the Query
involves 2 or more Table, the Delete Query may not be able
to identify *which* Record AND *which* Table to delete
from. Generally, Delete Query will only delete the Record
from the "Many-est" Table.

Personally, I prefer NOT to use joins in a Delete Query.
I prefer to use the WHERE criteria to identify the Records
to be deleted.

HTH
Van T. Dinh
MVP (Access)
 
Back
Top