The subform is a control of the main form
well, the subform is a form object, *held* in a "container" control within
the mainform. the subform object is not the container control, or vice
versa. think of the container control within the mainform as an embedded
window that displays the subform set by its' SourceObject property - much
like the screen-in-screen concept of television sets.
the "allow"
properties of a subform are ruled by how they are set on the main form
actually, i found that to be *almost* completely incorrect. i testing my own
working database, in A97 (where it was built), and a copy converted to A2000
(and running in A2003). i found the behavior of the subforms, regarding the
topic we're discussing, to be identical in both versions.
the RecordsetType, AllowAdditions, and AllowDeletions properties worked
independently in the mainform and subform. The AllowEdits property worked
independently when it was set to Yes in the mainform and No in the subform,
*but* when set to No in the mainform, it prevented edits in the subform. i
suspect that's the case because setting the AllowEdits property to No seems
to have the same effect as setting all controls' Locked property to Yes -
and setting the container control's Locked property to Yes prevents changes
in the subform, regardless of AllowEdits/AllowAdditions settings in either
mainform or subform.
deleting a record in the mainform will cause a cascade delete of related
subform records, when CascadeDelete is enabled in the Relationships window -
and regardless of the AllowDeletions setting in the subform. and that makes
sense because the cascade delete is, i imagine, carried out via a Delete
query, which runs automatically and independently of the open form.
and, finally, the DataEntry setting works independently when it's set to No
in the mainform and Yes in the subform. i didn't test the reverse, because
my mainform subform data are properly related, so i couldn't add subform
records without an existing mainform record anyway. and i didn't want to
bother setting up a test using *unrelated* mainform/subform data, though i
suspect that when the data is not related, the setting will work
independently in each object.
hth