Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to move down one line after entered a record in a gr
Message
De
19/04/1999 10:30:57
Dennis Schuette
Customized Business Services, Llc
Yuma, Arizona, États-Unis
 
 
À
18/04/1999 04:22:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00209369
Message ID:
00209666
Vues:
13
This is a sample of some code I used just last week. The only problem is that if the user presses Down Arrow in column2,3,4..., the focus sometimes stays in that column. If you fix that problem, please let me know. Hope this helps:

**Use this If/Endif for each column's Text1 control
** user pressed Down Arrow on last record
if nKeyCode=24 and recno()=reccount()
select (alias)
append blank && add a blank record
go bottom
This.Parent.Parent.Refresh() && refresh grid
**set focus to Column1 regardless which column user was in when Down Arrow was pressed
This.Parent.Parent.Column1.Text1.SetFocus()
endif

**Use this If/Endif for the LAST column's Text1 control
**if user presses ENTER on last column of last record,
** reassign to Down Arrow so new record will be appended
if nKeyCode = 13 and recno() = reccount()
nKeyCode = 24
endif
This.Parent.Parent.Column1.Text1.KeyPress(nKeyCode)
Dennis Schuette
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform