Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Re-order records with MOVE UP / MOVE DOWN
Message
De
15/11/2000 22:14:14
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
15/11/2000 09:12:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00441438
Message ID:
00442455
Vues:
18
>>Please share your your psuedo-code off the top of your head for the MoveUp.click() method....
>
>Um, ok:
>
>
if order > 1 && can't use "not bof()" because of the order tag
>	replace order with order - 1
>	skip -1
>	replace order with order + 1
>	skip
>	thisform.refresh()
>endif
>That should flip flop the record with the previous one if its not the first record.

Not necessarily - when you replace order with order-1, it may come BEFORE the previous record (if order is the active tag). The way I did it back in 2.6 (using OKLs on Ctrl+PgDn and Ctrl+PgUp) was about this:
nCurRec=recno()
nCurOrd=order
skip -1 (or +1 if moving down)
nOtherOrd=order
replace order with nCurOrd
go nCurRec
replace order with nOtherOrd
now do the refresh

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform