Ransome,
Try this way -
In AfterRowColChange Event :
Local nDr, nCr, nRecNo, nSelect
nSelect = Select()
nDr = 0
nCr = 0
Select grdvDetail
nRecNo = RecNo()
Scan
nDr = nDr + vDebit
nCr = nCr + vCredit
EndScan
Goto nRecNo
Select (nSelect)
ThisForm.txtDrTotal.Value = nDr
ThisForm.txtCrTotal.Value = nCr
Manoj