Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calculated value from subform in form also

Status
Not open for further replies.

jmann

Programmer
May 24, 1999
1
US
I had been able to get the value from the subform to the form, my problem is that I need that value in the table of the form and since the field's control source is =[formula] I am unable to get that value into the table. I also want to be sure that if additional values are added to the payroll datasheet subform, that the final totals are recalculated to include the proper amount. Any suggestions will be greatly appreaciated. Guess right now I can't see the forest for the trees.
 
This may seem like over kill, but put a extra field on your form and make its Visible properties false it will be the calculated field.<br>
The other field which shows makes its Data source the same as your field in the table.<br>
In the &quot;after update&quot; event of the Invisible box put Me!subtotal = Me!Invisiblebox<br>
Where the subtotal field is connected to the table and the &quot;Invisible&quot; box has the calculation it.<br>
<br>
hope this Helps<br>

 
A more conventional solution is to use the form's OnCurrent Event to calculate the control's value. Then you can make the control's source the field in the table, as you normally do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top