Recalc

livvie

Registered User.
Local time
Today, 08:50
Joined
May 7, 2004
Messages
158
I am using recalc to recalculate a total field in a form footer it is fine when I am editing a record but when I am adding a new one it refreshes the entire form - why ?
 
are the refreshing the form or just the field???

if you can paste your code that you are using to recalc the field that would be good.

Also the name of the field and the name of the form
 
I am refreshing the form but I would like to just refresh the field (I cannot get the syntax for this)
I am using Access 2003 .adp
The form is called fsubestdets and the control is txtsubtotal

Private Sub txtmatcost_AfterUpdate()
Dim mymatid As Variant
Dim MyExtCost As Variant


If Me.Parent.txtnew2 = "saved" Then
mymatid = Me.txtmatid

Me.Recalc

Call Calcs1


Me.Recordset.Find "[matid]= " & mymatid
Else
End If


End Sub
 
try

txtsubtotal.requery

let me know if this works.

This is what i would do i am normal access database. I have not used the adp form etc
 
it stops the entire form being refreshed but it doesn't update the subtotal (recalc did)
 
sorry my fault, I forgot you said subform. Use the following

Me.SUBFORM_NAME!txtsubtotal.Requery


It should work now, sorry about that trying to do more than one thing at a time...
 
but this code is on the subform ? so therefore I get a method or data member not found error.
 

Users who are viewing this thread

Back
Top Bottom