Math equations that span both form and subform

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.
 
J

JP

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.
 

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