Hi Mike
Thanks for your response. I'll give this a shot and let you know. Thanks again.
<i><font color="#663300"><i><font color="#663300">I have a form with a pageframe and on page1 I have a grid for the child bizobj alls well as far as data entry goes.
Now there is a col in the grid that I want to total, the code in Page1.Refresh() follows: <code> DODEFAULT()
LOCAL lnSelect, lnRecNo, lyTotal
lnSelect = SELECT()
SELECT v_sjvdr lnRecNo = RECNO()
SUM v_sjvdr.yAmount TO lyTotal
GO (lnRecNo)
SELECT v_tjv REPLACE v_tjv.yDrTotal WITH lyTotal This.txtYdrtotal.refresh()
SELECT (lnSelect) <code>
This seem to trigger pointer change. So if I just enter the grid and try to exit out of the form, I get the message to save my changes and at time I get this message twice??
Please advise. </font></i> Hey Bhavbhuti, I have the same thing going on on one of my forms. What I did was to put the code for the sum in the refresh of the text box that displays the sum value. The code goes as follows, basically the same as yours:
LOCAL lnOldArea, lnRecno, lnTotal
DODEFAULT() IF !EMPTY(<field from the view to be summed>) lnOldArea = SELECT() SELECT <viewname> lnRecno = RECNO() CALC SUM((<field from the view to be summed>) TO lnTotal ThisForm.nExtTotal = lnTotal This.Value = lnTotal GO RECORD lnRecno SELECT(lnOldArea) ELSE This.Value = 0 ENDIF
I hope this helps. </font></i>
Regards Bhavbhuti ©2002 Bhavbhuti Nathwani |