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

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?
 
J

Jerry Whittle

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.
 
D

djf

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.
 
E

efandango

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.
 
J

John W. Vinson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top