Sufborm update problem

  • Thread starter Thread starter OceanView
  • Start date Start date
O

OceanView

As simply as I can put it: I have a main form with two subforms. On
the main forms, there are some required fields. On the subforms (with
a master/child link to the main form), there are also required fields,
or more correctly, at least one record is required.

The trouble is, the update on the main form triggers before they can
enter any data into the subform, and that's when I check required
fields on the main form.

Can anybody think of a reasonable way around this? I thought of
UNlinking the subforms, but that creates other messy problems with
keys. Your guidance is appreciated!
 
Access saves the main form record before focus can move into the subform.
Similarly, it saves the subform record before focus can move back to the
main form (or to another subform.) Therefore the approach you have is not
going to work.

If the main form and subform are bound to the same table, you might be able
to use a tab control to hold the various fields, moving from tab to tab
instead of from main- to subform. However, if you have lots of fields in one
table, that might not be a normalized design.

If you have a main form bound to one table, with a subform bound to a
related table (as is common), you will need to rethink your interface. The
subform record cannot be created in the related table until the record
exists in the main table for it to relate to. Therefore you cannot require a
related record before you permit the main table record.
 
Back
Top