Adding records to subforms

  • Thread starter Thread starter Cathleen
  • Start date Start date
C

Cathleen

I have a form with two nested subforms, each with a source from a different
table. I would like users to be able to add records but not make edits or
deletions. However, when I set the Allow Edits property of the main form to
No, I can no longer add new records to the subforms. (I can add records to
subfroms when the main form Allow Edits property is set to Yes). How can make
the subforms accept new records without allowing edits to the form?

Thanks so much for any advice I can get!
 
I have a form with two nested subforms, each with a source from a different
table. I would like users to be able to add records but not make edits or
deletions. However, when I set the Allow Edits property of the main form to
No, I can no longer add new records to the subforms. (I can add records to
subfroms when the main form Allow Edits property is set to Yes). How can make
the subforms accept new records without allowing edits to the form?

Thanks so much for any advice I can get!

You will indeed need to have the mainform's allow edits true to permit any
editing (including additions) on the subforms. What you can do is use the
mainform's Beforeupdate event to cancel any changes, with any warning message
you want (or none at all). Just set the BeforeUpdate event's Cancel argument
to True.
 
I have a form with two nested subforms, each with a source from a different
table. I would like users to be able to add records but not make edits or
deletions. However, when I set the Allow Edits property of the main form to
No, I can no longer add new records to the subforms. (I can add records to
subfroms when the main form Allow Edits property is set to Yes). How can make
the subforms accept new records without allowing edits to the form?

Thanks so much for any advice I can get!

You will indeed need to have the mainform's allow edits true to permit any
editing (including additions) on the subforms. What you can do is use the
mainform's Beforeupdate event to cancel any changes, with any warning message
you want (or none at all). Just set the BeforeUpdate event's Cancel argument
to True.
 
Back
Top