Pare, it works pero you are making it move/skip a record. No chance for just making stay on the same record?
thanks
PS actually pinagtripan ko lang ito, intriga lang ako bakit di gumagana
>Check Below..
>>>Jojo,
>
>I am using VFP6 and this is my situation:
>
>I dropped a grid on a form, set its RecordSourceType to Alias, then RecordSource to Customer. ColumnCount is 3, first two columns' ControlSource to CustCode field and CustName field. In the 3rd column I removed the textbox control and dropped two commandbuttons and named them cmdDelete and cmdRecall.
>
>In the Click event of cmdDelete:
>
>
>DELETE
>ThisForm.Grid1.Refresh()
>In the Click event of cmdRecall:
>
>
IF !DELETED()
> DELETE
> SKIP
> IF DELETED()
> Thisform.grid1.column3.CurrentControl = "cmdRecall"
> Endif
> Thisform.Grid1.Refresh
>ENDIF
>
>
>RECALL
>ThisForm.Grid1.Refresh()
>
IF DELETED()
> RECALL
> SKIP -1
> thisform.grid1.column3.CurrentControl ="cmdDelete"
> Thisform.grid1.Refresh
>ENDIF
>
>Then, in the DynamicCurrentControl of the Column3- IIF( DELETED(), "cmdRecall", "cmdDeleted" )
>Then, Column3.Sparse = .F.
>
>Upon running the form, the commandbuttons show up properly according to the Deleted state of the record. Clicking on the buttons the FIRST TIME will work ok (i.e., if you try to click on the Delete button, it will delete the record (DeleteMark = .T.), and cmdRecall becomes the currentcontrol, as expected.)
>
>Clicking on the SAME record a second time will no longer work! You have to go to another record then go back for it work.