Delete Query based on result of select query
From: Ted Allen (anonymous_at_discussions.microsoft.com)
Date: 07/02/04
- Next message: Kris L.: "Problems with Query in a Subform"
- Previous message: Rick B: "Re: Query on Month"
- In reply to: John Finch: "Delete Query based on result of select query"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 2 Jul 2004 09:47:26 -0700
Hi John,
My guess is that when you changed the select query to a
delete query you may not have specified which table you
want to delete the records from.
When you changed your select query to a delete query, a
new line in the query builder should have appeared
(labeled "delete:") which allows you to specify which
table you want to delete records from. In one column you
should select the table.* that you want to delete from,
and then select FROM on the delete line. For any
additional columns in the query, the setting should be
WHERE, to specify your criteria.
HTH, Ted Allen
>-----Original Message-----
>Hi there,
>
>I am going round in circles here and hope that someone
can
>give me some help.
>
>I have a select query that finds 18 records (with a
>primary key made up of four fields) - I then want to
>delete these 18 records from a table.
>
>I tried creating a delete query based on the table and
>using dlookup in the criterier of the four fields but
this
>only results in one record being deleted.
>
>I then tried creating a select query linking the
previous
>query and the table I wished to delete from by linking
on
>the four fields. As a select the query showed me all 18
>records but as soon as I changed the query type to
delete
>and run it I get "specify the table containing the
records
>you want to delete".
>
>Is it going to be possible to do what I am trying to do
>using query alone or will I need to write some sql?
>
>looking forward to any help you can offer.
>
>with kind regards
>
>John Finch
>.
>
- Next message: Kris L.: "Problems with Query in a Subform"
- Previous message: Rick B: "Re: Query on Month"
- In reply to: John Finch: "Delete Query based on result of select query"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|