PC Review


Reply
Thread Tools Rate Thread

Delete Query Help

 
 
SITCFanTN
Guest
Posts: n/a
 
      11th May 2010
I'm running a delete query that removes the records from table tblAllRecords
when the PolNo is also found in a table called tblTransfer. When I run the
query as a select query, it identifies 281 records to be deleted. When I run
the query as a delete query, I get a messge box saying the query will delete
281 records from the table tblAllRecords, however after the query is run, I
have 7,481 less records in my tblAllRecords!! I have never expereinced this
before. What is happening? Any help you can give me is greatly appreciated.

I'm running this query against my tblAllRecords

Where
(Select [PolNo] FROM tblTransfer)


 
Reply With Quote
 
 
 
 
John Spencer
Guest
Posts: n/a
 
      11th May 2010
BACKUP BACKUP BACKUP

DELETE
FROM tblAllRecords
WHERE PolNo in
(SELECT PolNo FROM tblTransfer)

If that is not what your SQL looks like then copy and paste the SQL statement
from the SQL window (View: SQL)

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

SITCFanTN wrote:
> I'm running a delete query that removes the records from table tblAllRecords
> when the PolNo is also found in a table called tblTransfer. When I run the
> query as a select query, it identifies 281 records to be deleted. When I run
> the query as a delete query, I get a messge box saying the query will delete
> 281 records from the table tblAllRecords, however after the query is run, I
> have 7,481 less records in my tblAllRecords!! I have never expereinced this
> before. What is happening? Any help you can give me is greatly appreciated.
>
> I'm running this query against my tblAllRecords
>
> Where
> (Select [PolNo] FROM tblTransfer)
>
>

 
Reply With Quote
 
KARL DEWEY
Guest
Posts: n/a
 
      11th May 2010
Post the SQL of both queries - your 'select' and 'delete' query.

--
Build a little, test a little.


"SITCFanTN" wrote:

> I'm running a delete query that removes the records from table tblAllRecords
> when the PolNo is also found in a table called tblTransfer. When I run the
> query as a select query, it identifies 281 records to be deleted. When I run
> the query as a delete query, I get a messge box saying the query will delete
> 281 records from the table tblAllRecords, however after the query is run, I
> have 7,481 less records in my tblAllRecords!! I have never expereinced this
> before. What is happening? Any help you can give me is greatly appreciated.
>
> I'm running this query against my tblAllRecords
>
> Where
> (Select [PolNo] FROM tblTransfer)
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete Query - Delete matching records from 2 tables - Access 2000 Chris Stammers Microsoft Access Queries 4 22nd Jan 2009 02:45 PM
Delete query unable to delete records from table. Fix how? =?Utf-8?B?TG9uZ1RvbQ==?= Microsoft Access Queries 8 15th Apr 2007 11:29 AM
Delete Query Error "Can't delete from specified tables Maureen227 Microsoft Access Queries 4 26th Jul 2006 04:58 PM
Delete Query Error "Can't delete from specified tables Maureen227 Microsoft Access 6 26th Jul 2006 03:36 PM
How to Delete a Range in Closed Workbook (to Replace Delete Query) resant_v@yahoo.com Microsoft Excel Misc 1 8th Mar 2006 10:10 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:15 AM.