Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SET DELETED not working??
Message
De
08/07/1998 16:06:07
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00115018
Message ID:
00115457
Vues:
16
>I have the strangest thing happening (again). I have set deleted ON in my form, and a grid which its data source is a view. On the lostfocus method I have code that deletes the current field if empty, so, when I press ENTER, it fires the code, deletes the record and takes it out of sight(set deleted working), but, when I use the arrow UP key, it fires the code, deletes the record but STILL I can see it on the grid (set deleted not working), inclusive, the delete mark shows to the left of the grid. What's going on? Why this type of behaviour on something so basic? I've used REFRESH and everything you can think of, but nada.

You are sitting on the record, and therefore you see it. You can actually GO 1234, and you'll see it, even if it's deleted. It's just that the commands which affect _tally will skip it (like running a report, Count, Sum, skip etc).

The solution for your case could be

delete
locate rest
if eof()
go bott
endif
[fire any refresh now]

This way you move off the deleted record, and the refresh will show the next available record, or the new last record (if you deleted the previously last one).

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