I have an access XP app that is being converted to 2013 with SQL Server. There is a typical subform / main form with a subform with Quantity, Retail, Days and calculated control Amount (controlsource==[Quantity]*[Retail]*[Days] )
On the older version working since 2.0, when Quantity was updated, Amount would update, When that line was updated, the subtotal on the main form would update. Now Neither update happens.
I have been able to force the Amount control in the line to update with an Me.Amount.Requery in the afterupdate of Quantity, Retail, and Days. That is nice and clean.
Subform Detail Controls:
Quantity, Retail, Day, Amount (controlsource = =[Quantity]*[Retail]*[Days])
Subform Footer Controls:
Subtotal (controlsource = =Sum([Quantity]*[Retail]*[Days]) )
Main Form Controls:
Subtotal =IIf(IsNull(Forms!frmJobs!ctl_subLI.Form!Subtotal),0,Forms!frmJobs!ctl_subLI.Form!Subtotal)
I have tried many variations to get the subtotal to update WITHOUT a requery or recalc. When i do that it sends the cursor back to top.
I have the subform visible and can see that the subform total does not update when you move off the detail record to and detail record.
Here is the Subform After Update and some of what i have tried. Non work with a whole refresh or requery.
Me.Amount.Requery
Me.Subtotal.Requery
Me.Refresh
Me.Parent.Subtotal.Requery
Me.Parent.Refresh ' This will make it update, but moves cursor to top
'Me.Recalc ' this will work but moves cursor to top
Is there a way to resolve this behavior? I would rather not have to whole form refresh since the way it repaints is not that nice, and the cursor goes to top.
Our community of experts have been thoroughly vetted for their expertise and industry experience.