Math equations that span both form and subform

  • Thread starter Thread starter DJW
  • Start date Start date
D

DJW

My main form is "frm_Payments". My subform is "frm_subPayments".

What I want to do is write visual basic code (after update) that subtracts
the one field from another and places that value in the third. My problem
is one field (AmountRecieved) is on the subform and the other two
(AmountOwed and Balance) are on the main form. If I had all three fields on
the same form, the equation would look like this:

[Balance]=[AmountOwed]-[AmountRecieved]

However since "Amount Recieved" is on the subform the equation will not
reference it.
 
Check The Access Web (http://www.mvps.org/access/)

They have an excellent writeup describing how to refer to subform fields
from the main form (which is what you need), how to refer to main form
fields from the subform (which you'll need some day) and how to refer to
fields on other forms.
 
Back
Top