Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 30-11-2010
Member
 
Join Date: Oct 2010
Posts: 12
Access 2007: "cannot delete from specified tables" error

I have created a database in Access 2007 which I am running on Windows XP computer. The database is all about maintaining the records of the employees database who resides on the company's apartment. So as you may the street, area etc would be exactly same except the flat number since each one of them have been allotted different flats. So I want to delete the records of the employees who have left the company in order to make the note of how many flats are left with me unassigned. But the problem occurs when I here itself. Whenever I fire the delete query I have the message which says "cannot delete from specified tables". I don't know what it is reporting too and so I need your help. Can you help me in deleting those records or at least explain me what this error message indicates or refers to?
Reply With Quote
  #2  
Old 30-11-2010
Member
 
Join Date: May 2009
Posts: 620
Re: Access 2007: "cannot delete from specified tables" error

There are number of possibilities which can result into this error message. May be you have cascaded queries, to delete an entry, which is not possible. Moreover if you are trying to use a single delete query to remove record from two different tables than that too isn't possible. Also make sure you don't use DISTINCT word in your delete query, this will not work. That is the limitation of the DELETE query that you can't use DISTINCT. Why don't you run the query first using just SELECT, instead of DELETE directly, to know what the outcome of the query is? This will clear out your question where the problem is occurring and why you are not able to carry out the delete operation.
Reply With Quote
  #3  
Old 30-11-2010
Member
 
Join Date: May 2009
Posts: 533
Re: Access 2007: "cannot delete from specified tables" error

You may receive the "cannot delete from specified tables" error message if the delete query contains multiple tables and the UniqueRecords property is set to No. To resolve this problem, set the UniqueRecords property of the query to Yes. To do this open the delete query in Design view, go to the View menu, and click Properties. Set the UniqueRecords property to Yes. Save the changes done in the query and then close it. With this changes, Access will include the DISTINCTROW predicate with the query. This retrieves unique records in a multi-table query where fields have only been selected from the one-sided table in the query.
Reply With Quote
  #4  
Old 30-11-2010
Member
 
Join Date: Nov 2008
Posts: 1,192
Re: Access 2007: "cannot delete from specified tables" error

The first thing that comes to my mind is that if the user has rights to delete the records. Make sure you have the sufficient privileges to delete the records. To check it out, go to the Design View by double clicking on the table. Now click on Properties button and check out the privileges. Moreover, you can not delete the data from a linked SQL table in Access 2007 without the primary key. If you are using JET database then you can even add DISTINCTROW in your query and see if that helps.
Reply With Quote
  #5  
Old 30-11-2010
Member
 
Join Date: Nov 2008
Posts: 1,221
Re: Access 2007: "cannot delete from specified tables" error

If I were you then I would have gone for checking the ConnectionString of that database. Also make sure if you can see the file in the correct location where you are addressing your query to. The user right is of prime importance in this kind of operation. You must have read, write and delete permissions on the directory which contains the database. You must also see a lock file (ldb) on the same location. It should be created on the first user in and deleted on the last user out. If, by chance, anything goes improper over here then this may result you with a read-only database irrespective of the other permissions which it was set.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Access 2007: "cannot delete from specified tables" error"
Thread Thread Starter Forum Replies Last Post
Error code: 0x80070035 Windows cannot access \\"networkpath"\"foldername" WYNNn Networking & Security 5 16-01-2011 07:26 PM
Access 2007 gives "ODBC--call failed" error message hARSH007 MS Office Support 5 01-12-2010 08:11 AM
"Access denied" error in a subfolder that the user has "full-control Justvicks Active Directory 1 19-10-2009 09:48 AM
"History" and "Recent" Folders--how to delete contents ? troop Windows XP Support 7 13-06-2009 01:53 PM
Project Web Access via IE7: "Export Grid to Excel" cause VBSCRIPT (error) message: "The activeX control on which this feature depends could not be created" Theo-Dore Microsoft Project 2 17-01-2007 09:47 PM


All times are GMT +5.5. The time now is 05:08 PM.