Can't Delete Form or Query Records. Read only?

  • Thread starter Thread starter efandango
  • Start date Start date
E

efandango

I have a SubForm that is based on this Query/Table structure

tbl_points
Point_ID Primary Key

the above field is linked on a 1-to-many basis to the fields below

tbl_Point_Notes
Point_ID Number

tbl_SetDown
Point_ID Number

tbl_Point_Leave_By
Point_ID Number

If I try and delete a record on the form or in the underlying query. I get
an error saying the form or query is read only. Have I set up my
relationships incorrectly or can I set the form do be write as well as read?
 
This is a very complicated subject. I suggest that you open up Access Help,
go to the Find tab, type in "updatable" (lower case u) or "About updating
data", and then scroll down to "When can I update data from a query?" or "Why
can't I edit data in my form?". There you will find a lot of, possibly too
much, information on the subject. In a nutshell, if the query is based on one
table or tables with a one-to-one relationship, you will be able to edit or
delete records. If it is based on two or more tables with a one-to-many
relationship, you 'should' be able to edit or delete records. If you have
three or more tables based on many-to-one-to-many relationships, you will not
be able to edit or delete records. This is just the highlights. Help has much
more information.
 
Make sure all of your tables have primary keys. Access will give the "not
updateable query" message if one of the tables in a join doesn't have a
primary key. Adding the key can solve the problem.
 
Jerry,

Thanks for replying. aren't my tables example below a case of 1-to-many
relationship? Is it an absolute rule that, if as you say "In a nutshell, if
the query is based on one table or tables with a one-to-one relationship, you
will be able to edit or delete records". If so, does this suggest that there
is something wrong with my database?

I am using Access 2007, and I can't find those particular type of Help
references that you mentioned in your last post.
 
I have a SubForm that is based on this Query/Table structure

tbl_points
Point_ID Primary Key

the above field is linked on a 1-to-many basis to the fields below

tbl_Point_Notes
Point_ID Number

tbl_SetDown
Point_ID Number

tbl_Point_Leave_By
Point_ID Number

If I try and delete a record on the form or in the underlying query. I get
an error saying the form or query is read only. Have I set up my
relationships incorrectly or can I set the form do be write as well as read?

Please open the Query in SQL view.

Ordinarily one would NOT try to base a Form on a four table query - you'll get
wierd repeating records, problems with updating, etc. I would suggest using a
Form based on tbl_points with three Subforms, one for each of the related
tables.
 
Back
Top