Cannot add record in subform

G

Guest

Hi, folks. I have a main form linked to a subform, and I'm unable to add or
modify records in the subform. I don't get any error messages; there's no
"*" button on the subform to add a new record, and I can't edit any existing
records.

This USED to work - last week - but I've obviously changed something
critical. I've changed a lot of things, but nothing relating to the linking
of the main table to the related query. (I think...) I even made a copy of
the DB and chopped out everything I've added since then, with no luck.

There are three subforms based on three separate queries, but everything is
linked to the same primary key field in the main form. They all worked last
week and none of them work now, which makes me think that I've screwed up
something in the main form.

1. I can add and edit records in the query, if I enter something valid in
the linking field.

2. If I open the subform by itself, I can edit records, and the "*" button
is available. I added the linking field to the subform and tested it; I can
add records.

3. I checked the form and field properties, and everything seems to be in
order. Nothing I can find is locked or disabled.

It's normally something stupid that I've done; I'm sure it's the same way
now.

Any suggestions for anything to check that would cause me to be unable to
save or edit records in the subform?

Thanks Much.
 
R

Ron2006

In Design view on the form, in the data tab to you have yes in the
allow edits, adds, deletions?

Where are you calling the main form from? Check there that you have not
changed it to a readonly? (this is particularly true if you are using
the access switchboard.)

Since the queries allow you to do what you expect then it seems it has
to be in one or more of the forms in either the data tab or in the way
the form is being called.
 
G

Guest

Hi, Ron.

In fact, I _did_ have all those things turned on the Design view, and
couldn't figure out why it wouldn't allow me to do those things.

I've noticed that, in Access 2003, if you have the Properties window when
you're designing the form, switching to the Form view doesn't close the
Properties window. Then this morning, I noticed that in the subreports the
"Allow Edits", "Allow Additions", and "Allow Deletions" properties were set
to NO in the FORM view! So I changed them back to "YES" for each of the three
subforms, and bingo! Problem solved. I'm still not sure how those things got
set to NO, since, as I said, it did work last week. I blame it on... um,
sunspots. Yeah, sunspots. That's the ticket!

Seriously, I didn't change them (unless I did it in an Ambien-induced dream
state, ala Patrick Kennedy) because I wanted those subforms to be editable.
I can only deduce that I changed some database relationship which disallowed
edits, and changing the relationship back didn't restore the editability of
the subforms.

Live and learn, I guess.
 

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