Compare Sum of Subform Field to Parent Form Field

I

Ian

I have a subform in datasheet view with a field called quantity. The main
form has a field called total quantity (when a product is received the total
quantity (TotQuan) is marked then its' distribution is recorded in the
subform).

I would like a check before the form is closed (or the record navigated away
from) to ensure that the sum of the subform quantities = main form totquan.

I thought about doing a msgbox in the afterupdate field of the subform but
am not sure where to put the code and how to compare the fields. Thx.
 

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