Use parent form value in sub-form calculation

kroeger

Registered User.
Local time
Today, 02:21
Joined
Apr 13, 2014
Messages
39
Hi, I have a parent form where I enter a value for tax rate. I need to use this value in the tax calculation in the subform fields i.e. subform.taxdue = subform.qty * subform.price * parent.taxrate.

I can get the value into the field. But I do not think I am putting it in the correct event. The parent form is a sales form and the subform is the sales items form. So there can be multiple items on the sub form. Please help me sort this out.
 
But I do not think I am putting it in the correct event.
Since you aren't showing what you did, how are we supposed to guess? Attach information to show what you did, to show what happend in response to whatever it was you did (specify what) and also specify the expected outcome. We do not read minds and only have the info YOU provide.
 
I have an unbound text box on the parent form called txtTaxRate.

I have all of the subform fields bound to the SaleItems table. The field in that table called taxDue is the one I want to put the calculation in. There are also fields for qty and price. I want to do something like: Me.Parent!txtTaxRate /100 * Me.Qty * Me.Price in the subform field. But it is not performing the calculation.
 
I have an unbound text box on the parent form called txtTaxRate.

I have all of the subform fields bound to the SaleItems table. The field in that table called taxDue is the one I want to put the calculation in. There are also fields for qty and price. I want to do something like: Me.Parent!txtTaxRate /100 * Me.Qty * Me.Price in the subform field. But it is not performing the calculation.

=Forms![ParentFormName].[ParentFormField]/100 * Me.Qty * Me.Price
 

Users who are viewing this thread

Back
Top Bottom