Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleted records still show
Message
 
 
To
04/05/2001 18:08:49
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00503749
Message ID:
00503852
Views:
18
>>I was wondering why the deleted records are still showing in the table.
>>The following are the codes that I put at "click" event of my delete command button.
>>I am sure the deletions were successful since when I exited my program and did a
>>pack and re-index to the resulting table, those records that were deleted thru my
>>program were gone. But why were they still showing in the table when I was running
>>the program, could somebody please help?
>
>The controls are still bound to the current record, even though it's deleted, because you're sitting on it. You could GoTo [recno() of a deleted record] and it would show up. Deleted records (with Deleted On) are invisible any way you move the record pointer, except for GoTo and no motion at all.
>
>So, you got to move off the deleted records. As to how, there's a variety of ways; I'm using this
>
>
locate rest
>if not found()
>   locate
>endif
>I.e. I go to the next record; if I deleted the last one, I go top. I know, going to the previous record would be more logical - but then I'm doing this in places where I have only a few records, so jumping to top of the grid doesn't matter much.


Dragan,

Seems like you didn't read this message carefully :) See the code with skip -1. I bet, that the form has set deleted off (default setting), that's why the deleted records are visible.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform