Me.Recordset.Requery
i try that code under the itemid after update , then under the subform after update but it didn't update the txt2 textbox .Try requerying the form's recordset intead.
Normally, I would use Recalc, instead of Requery, but I don't know what your code looks like. So, this is what I am saying above.
Hope that helps...Code:Me.Recordset.Requery
Like I said, you probably need to use Recalc, but I can't say for sure, since we can't see your form. Is txt2 bound to an expression? What is in its Control Source?i try that code under the itemid after update , then under the subform after update but it didn't update the txt2 textbox .
yes txt2 on the mainform , bound to an expressionLike I said, you probably need to use Recalc, but I can't say for sure, since we can't see your form. Is txt2 bound to an expression? What is in its Control Source?
So, try Me.txt.Recalc instead.yes txt2 on the mainform , bound to an expression
under which event ?So, try Me.txt.Recalc instead.
Under whichever event you were using Requery.under which event ?
i try it , but it return to the firsr record on that sub formUnder whichever event you were using Requery.
PS. Just make sure you reference the control properly, i.e. use the proper syntax.
Did you remove the Requery part?i try it , but it return to the firsr record on that sub form
yes of course .Did you remove the Requery part?
Try:hii dears
on main form a textbox ( txt2 ) to gives me the total of subform some field
how to requery that textbox ( txt2 ) after user add new item on the sub form without return to the first record on the subform ?
Which event are you using?yes of course .
plz understand me .Try:
Me.txt2.Form.Recalc
Can you post a sample db with test data?????
Help please
Can you post a sample db with test data?
the problem of requery and recalc is when user insert new record on the sub form it jumps to the first record on that subform ....In the AfterUpdate event of the subform, you can recalc the main form control.
Unless you have a save button on the subform, the record you changed will not be updated until you move to a new subform record or back to the main form. That may be why you are not seeing the update immediately.