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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating Calculated controls on Subforms

Status
Not open for further replies.

jambet

Technical User
Jan 8, 2007
5
US
I have a tabbed subform (frmProd) (the secondary tab) that contains a calclulated control (weight) using data from a subform (frmWeights)on the frmProd subform. I am able to calculate these controls by using the ctlJob_GotFocus event with the following code, this being the first control to get focus when frmProd is opened independently of its parent.
Code:
Me.[10XIWeight] = Forms![frmProd]![frmWeights]![10XIwt] * Me.[Ctl10ft_XI]
However, when I open the parent form, frmJob, I cannot get the calculated control on frmProd to update. I have tried pasting the above code into the Activate, Current, GotFocus, Load, Open, and Resize events for frmProd and get either an error msg (Can't find frmProd) or no action whatever.
Maybe I am making this too difficult or just maybe I don't know what I'm doing, but I would appreciat any help I can get. I apologize for the length of this explanation.
 
jambet . . .

In the onCurrent event of the approrpriate form try [blue]Me.ReCalc[/blue] . . .

Calvin.gif
See Ya! . . . . . .
 
Thanks, AceMan. Tried the recalc with no positive result. I'll keep looking
 
And what about this ?
Me![10XIWeight] = Me![frmWeights].Form![10XIwt] * Me![Ctl10ft_XI]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top