Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Amount disappears when entering in a GRID
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Amount disappears when entering in a GRID
Divers
Thread ID:
00209170
Message ID:
00209170
Vues:
34
There is a keypress and valid event in the amount cloumn of this grid. In the keypress event, I test for the "enter" key, to move the pointer down one row. The valid event sums up the preceding rows to display a running total in a textbox.
When pressing the enter key on the last row the pointer goes to the next row but the amount disappears. What?
If i can give anymore info to help solve this please let me know,Thanks
**
It looks like this:
KeyPress Event:
LPARAMETERS nKeyCode, nShiftAltCtrl
LOCAL lnRecNo
SET DELETED OFF
lnRecNo=RECNO()
IF RECCOUNT()=lnRecNo
IF nKeyCode=13 OR nKeyCode=24
APPEND BLANK
KEYBOARD '{DNARROW}'
ENDIF
ENDIF
SET DELETED ON
**
Valid Event:
LOCAL lnTmpTotal,lnToCnt
lnTemp=RECNO()
COUNT FOR !DELETED() TO lnTotCnt
lnTmpTotal=0
GO TOP
DO WHILE NOT EOF()
IF !DELETED() then
lnTmpTotal=lnTmpTotal+amt
ENDIF
SKIP
ENDDO
GOTO lnTemp
gnAllTotal=lnTmpTotal
THISFORM.txtEnterTotal.VALUE=gnAllTotal
THISFORM.txtTotRecCnt.VALUE=lnTotCnt
This.refresh
Extreme Programming = Plan -> Design -> Code -> Test
Répondre
Fil
Voir

Click here to load this message in the networking platform