When you select the total, you must use the same record set as the record set you called for the form. When you update the data, you need to use the same where clause as the form used so that you only add up the records your scrolling region or db grid is looking at.

Albert

On 8/12/2014 9:15 AM, rehan wyne wrote:
Thanks to Razzak and Albert.

Albert,
Your describe method is interesting but little bit confusing to me.

Where and why, I should use "Where Clause", I have already used it with the "Edit using FormName where ....." command.

I just want to reflect the changed value in the totals, even if, user did not moved to other row or not yet saved the changed record.

Regards

Rehan Wyne


On Tuesday, August 12, 2014 7:11 PM, Albert Berry <[email protected]> wrote:




Use the where clause from the DB Grid or Scrolling Region data set and do an update. The underlying table will not know that the form is looking. Then do a mass posting, then last, refresh the Grid/Region. I often do an update to a row I am looking at on the form.

To display the total, you use a form variable.
fDBGridTotal = (SUM(Whatever)) FROM <source data>

Then each time you add a row or group of rows
RECALC VARIABLES

Albert

On 8/12/2014 3:03 AM, rehan wyne wrote:
Hi All,

How can I access DB Grid / DB Scrolling Region individual records to process them in a loop while that DB Grid / DB Scrolling Region is currently focused in the form?

For Example:
1. If I put "Auto save Off" and I want to put all rows into the base table ( of DB grid / DB Scrolling Region) after some processing and verification.

2. I just want to show Grand Total of a column including rows that were fetched from base table and all newly added rows into DB Grid / DB Scrolling Region that were not saved yet into base table.

Regards

Rehan Wyne
MIT




Reply via email to