>>>To programmatically refresh a table after a Delete, I'm using
>>>
>>>SKIP 1
>>>SKIP -1
>>>
>>>to get the proper next record, or previous if at Bottom. Someone noticed that the Wizard does a more complex refresh, with eof() & bof() checks. But my method seems to work...does anyone know of a problem with this or another simple way to do the table refresh?
>>
>>Hi Bruce,
>>
>>Don't know if it matters, but I have generally done something like this:
>>
>>
>>DELETE
>>SKIP 1
>>IF EOF()
>> GO BOTTOM
>> IF EOF()
>> WITH THISFORM.cntControls.cmgCommand
>> ... Disable appropriate buttons ...
>> ENDWITH
>> ENDIF
>>ENDIF
>>
>>
>That's fine too, that's the way a coworker is doing it...though my method has less code lines (excluding your empty table check). That's not to say that mine is more efficient, of course...I'm just wondering if there's some compelling reason not to use my method...
I use something like Bill posted, and it is used not only after DELETE(), but after any possible pointer moving, i.e. it's part of generic 'form refreshing' method which enable/disable navbuttons, fill controls values, etc. And to make it generic, I have to include e.g. eof() checks.
Edward Pikman
Independent Consultant