Subform moving to first record on parent requery..

P_Henry

Registered User.
Local time
Today, 10:01
Joined
Dec 3, 2003
Messages
63
Hi ,

I am having a problem when I try to do a refresh of the parent form (Got calculations), when I update the subform, the control of the subform goes to the first record. I want it to stay in the same record on the subform (SUb form is a single form attached to the parent form which is also a single form).
This may be something simple that I am failing to understand.
When the user clicks the save button, on the subform, the following code is executed:

Private Sub RefreshCalculation()


Forms!frmBudget.txtFYBudgetChangeMax.Requery
Me.Parent.Refresh


End Sub

Thanks,
Priya:confused:
 
Why are you refreshing/requerying?

If calculations are done within the fields in the subform, they will be updated straight away unless you're running queries or doing some DAO tricks.

Or am I not getting you?
 
I have computed fields on the mainform which are to be recalculated. There are command buttons on the mainform which do some processing and they are based on the computed field. So the user needs to update the subform and press the command button on the mainform . Hence the calculation requery.

Thanks,
Priya
 

Users who are viewing this thread

Back
Top Bottom