Can't edit subform - main form should not be edited.

C

Chris v.

Using Access 2007, I have two tables linked by the primary key "ID" in the
"Minors" table and the "minors_id" foreign key in the "Guardians" table. I
have a query for each table. the "Minors" query gets identifying data for my
Main Form, while the "guardians" query supplies the subform with its data
fields in which I need to enter new records. If I set the Main form's Allow
Additions, Allow Deletions, and Allow Edits all to NO, then when I set the
subform's properties to Allow Additions (Yes), I still have a grayed "new
record selector" and I can't add a new record? Can someone tell me what I'm
missing ... thanks.
 
A

Allen Browne

The subform is a control on the main form, so if you set the main form's
AllowEdits to No, you have locked the subform control (and hence whatever it
contains.)

So, you will need to set the Locked property of the other controls on the
main form to No.

I can suggest some code to do that programmatically if you wish:
http://allenbrowne.com/ser-56.html
Just name your subform control in the exception list so it stays unlocked.
 
C

Chris v.

Thank you for your speedy reply. You helped ... and I can move on with my
project!

:)
 

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