The situation:
One form: "Direct Cost", containig 3 sub-forms: "Materials", "Machinery" and "Salary", with a price "Subtotal" field (format: currency) in each one of them. Each subform have also, a "Total" field (Text Box) in Form footer, setting to "Not visible" (the field, not the form footer) and with a Control Source: =Nz(Sum([Subtotal]),0). Each of this text boxes names are: "MaterialsTotal", "MachineryTotal" and "SalaryTotal"
In the parent form: "Direct Cost", have 3 text boxes with: Enable = No and Locked = Yes and Control Source =[Materials].[Form]![MaterialsTotal], the Control Source of the second text box =[Machinery].[Form]![MachineryTotal]and the Control Source of the third: =[Salary].[Form]![SalaryTotal]. Names of this 3 texboxes: "MaterialGTotal"; "MachineryGTotal" and "SalaryGTotal"
In the footer section of the "Direct Cost" form, have another textbox with Control Source = [MaterialGTotal] + [MachineryGTotal] + [SalaryGTotal]
And the name of this semi-final textobox is: "DirectCostTotal"
Until here, everything is working fine. The problem is that this Direct Cost form, with all subforms and objects inside is, in turn a subform of another form named: "Stage" which have a textbox with Control Source =[DirectCost].[Form]![DirectCostGTotal] and name: "StageTotal".
In this step I have two problems:
1.- When, in user mode, I change values in the price Subtotal field of the Material subform, the "MaterialGTotal" field of the Subform and the "DirectCostTotal" of the parent form show the changes immediately, but the "StageTotal" don't update the value.
And this is the second problem) if I hit the Refresh button, the "StageTotal" field change, but something strange is happening (and here is where I say I have an evil gremlin hiding inside of the form), the field show a value that represent the summa of ...only two of the subforms!: the first on the top: "Machinery" and the last one at the botton: "Salary" and and stays at that value, no matter hw many times I hit the refresh button again.
Only if I change to the next registry and then go back, the "StageTotal" field update correctly, but if I make a value change in the one of the subforms...all happen again and continue ignoring the middle subform "Materials" subtotal's value.
Any ideas?, Can someone help me catch this gremlin?
One form: "Direct Cost", containig 3 sub-forms: "Materials", "Machinery" and "Salary", with a price "Subtotal" field (format: currency) in each one of them. Each subform have also, a "Total" field (Text Box) in Form footer, setting to "Not visible" (the field, not the form footer) and with a Control Source: =Nz(Sum([Subtotal]),0). Each of this text boxes names are: "MaterialsTotal", "MachineryTotal" and "SalaryTotal"
In the parent form: "Direct Cost", have 3 text boxes with: Enable = No and Locked = Yes and Control Source =[Materials].[Form]![MaterialsTotal], the Control Source of the second text box =[Machinery].[Form]![MachineryTotal]and the Control Source of the third: =[Salary].[Form]![SalaryTotal]. Names of this 3 texboxes: "MaterialGTotal"; "MachineryGTotal" and "SalaryGTotal"
In the footer section of the "Direct Cost" form, have another textbox with Control Source = [MaterialGTotal] + [MachineryGTotal] + [SalaryGTotal]
And the name of this semi-final textobox is: "DirectCostTotal"
Until here, everything is working fine. The problem is that this Direct Cost form, with all subforms and objects inside is, in turn a subform of another form named: "Stage" which have a textbox with Control Source =[DirectCost].[Form]![DirectCostGTotal] and name: "StageTotal".
In this step I have two problems:
1.- When, in user mode, I change values in the price Subtotal field of the Material subform, the "MaterialGTotal" field of the Subform and the "DirectCostTotal" of the parent form show the changes immediately, but the "StageTotal" don't update the value.
And this is the second problem) if I hit the Refresh button, the "StageTotal" field change, but something strange is happening (and here is where I say I have an evil gremlin hiding inside of the form), the field show a value that represent the summa of ...only two of the subforms!: the first on the top: "Machinery" and the last one at the botton: "Salary" and and stays at that value, no matter hw many times I hit the refresh button again.
Only if I change to the next registry and then go back, the "StageTotal" field update correctly, but if I make a value change in the one of the subforms...all happen again and continue ignoring the middle subform "Materials" subtotal's value.
Any ideas?, Can someone help me catch this gremlin?