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  dBforums > PC based Database Applications > Microsoft Access > Delete Query Problem

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-07-04, 13:45
Goldy Goldy is offline
Registered User
 
Join Date: Feb 2004
Posts: 90
Delete Query Problem

Hi.

I'm having problems creating a delete query. Each time I try to make one, the query becomes "non updatable" and therefore doesnt work.

The delete query needs to involve two tables and one query:

Table 1: Holds the key of which records to delete (eg only those with a key of "141")

Query 1: Holds calculations relating to the records to be be deleted (I only want to delete null values within a "total" calculation). This query references "Table 2".

Table 2: Is the table that needs the records deleting from.

Everytime I create a query with "Table 1 and Query 1" or "Query 1 and Table 2", it becomes unupdatable, and therefore any delete query built from it doesn't work.

Any ideas?

Thanks in advance.

Using Access 97.
Reply With Quote
  #2 (permalink)  
Old 03-08-04, 07:03
M Owen M Owen is offline
Grand Poobah
 
Join Date: Sep 2003
Location: MI
Posts: 3,714
Re: Delete Query Problem

Quote:
Originally posted by Goldy
Hi.

I'm having problems creating a delete query. Each time I try to make one, the query becomes "non updatable" and therefore doesnt work.

The delete query needs to involve two tables and one query:

Table 1: Holds the key of which records to delete (eg only those with a key of "141")

Query 1: Holds calculations relating to the records to be be deleted (I only want to delete null values within a "total" calculation). This query references "Table 2".

Table 2: Is the table that needs the records deleting from.

Everytime I create a query with "Table 1 and Query 1" or "Query 1 and Table 2", it becomes unupdatable, and therefore any delete query built from it doesn't work.

Any ideas?

Thanks in advance.

Using Access 97.
Can you post an example of what is happening?
Reply With Quote
  #3 (permalink)  
Old 03-08-04, 10:19
Goldy Goldy is offline
Registered User
 
Join Date: Feb 2004
Posts: 90
Thanks again M Owen for the response. I did in fact post a reply explaining the problem further. But I solved it not long after I created this thread.

I created a table that would hold, temporarily, the ID numbers of the records that contained null values in the relevant field. Then I created a delete query using this table and Table 2. This query was updatable, and so worked!

Thanks for responding, though.

Reply With Quote
  #4 (permalink)  
Old 03-08-04, 10:31
axsprog axsprog is offline
Grand Poobah
 
Join Date: May 2003
Location: Dallas
Posts: 646
usaully when a query is unupdatable itn is because you have brought the primary key into the grid from the master or primary table.

for instance if you have a patient table and with a one to many relationship on an appointment table you may be displaying the Patient id from the patient table instead of the appointment table.

try switching the id'd in the query and see if this works
__________________
Dale Houston, TX
Reply With Quote
Reply

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

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