A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Delete Query Help



 
 
Thread Tools Display Modes
  #1  
Old May 11th, 2010, 06:14 PM posted to microsoft.public.access.queries
SITCFanTN
external usenet poster
 
Posts: 49
Default Delete Query Help

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)


  #2  
Old May 11th, 2010, 07:36 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default Delete Query Help

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)


  #3  
Old May 11th, 2010, 07:51 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Delete Query Help

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)


 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:31 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.