E
Elaine
I have a Main Form and two subforms. All three are based on tables with both
subforms being related to the main table but not to each other. The two
subforms are: subfrm1Books and subfrm2Copies.
Both the subforms have a calculated field in common called CopiesEd. This is
a concatenation of the fields COPIES and EDITION. Neither of these fields is
a primary key in either table that is the Source for these forms.
I don't want anyone to add a record to subfrm2Copies if that item is not in
subfrm1. In other words if the same CopiesEd is not in subfrm2, it should not
be in subfrm1.
If the above does happen, I would like to make sure that the record is not
saved and to generate a friendly message saying that the Edition is not
available. I have tried to put some code in the BeforeUpdate property of
EDITION in subfrm2 but it does not work correctly.
Could someone please show me how this is done. Thank you!
subforms being related to the main table but not to each other. The two
subforms are: subfrm1Books and subfrm2Copies.
Both the subforms have a calculated field in common called CopiesEd. This is
a concatenation of the fields COPIES and EDITION. Neither of these fields is
a primary key in either table that is the Source for these forms.
I don't want anyone to add a record to subfrm2Copies if that item is not in
subfrm1. In other words if the same CopiesEd is not in subfrm2, it should not
be in subfrm1.
If the above does happen, I would like to make sure that the record is not
saved and to generate a friendly message saying that the Edition is not
available. I have tried to put some code in the BeforeUpdate property of
EDITION in subfrm2 but it does not work correctly.
Could someone please show me how this is done. Thank you!