Refreshing Parent Control

stretch66

Racing towards the start
Local time
Today, 13:04
Joined
Sep 28, 2005
Messages
72
Hi,

I'm trying to create a stock and ordering system and have a value for number of items ordered named [Quantity]

Have a control on a subform that records goods received named [TotalReceived]

On the parent form I have a control called [Outstanding] which is obviously the sum of [Quantity] - [TotalReceived].

What I want to do is after the update of [TotalReceived] I want to update the control on the parent form [Outstanding] but tried this below and it works fine if you are on the first record however if you are on any other record it throws you back to the first record without updating.

Me.Parent.[Oustanding].Requery
Me.Date_Received.Value = Date
Me.Size.Value = [Forms]![StockReceived]![Size].Value

Could someone help with this please or even tell me a better way of achieving this.

Thanks
 
If the Outstanding value is recalculated via the subform VBA, nothing more needs to be done. You're references may not be correct.

If the controlsource of Outstanding is a formula, your calculation references are probably wrong or merely need to be "Refreshed", not "Requeried.
 

Users who are viewing this thread

Back
Top Bottom