>I want delete records of my emails.dbf, and copy them to a backup table called emails_ex.dbf
>
>In method keypress of column of my grid with belongs to emails.dbf
>
>*************************************************
>LPARAMETERS nKeyCode, nShiftAltCtrl
>
> IF nKeyCode = 7
>SELECT emails
> STORE emails.cod TO esteCOD
>
>SELECT emails_ex
> APPEND FROM emails FOR emails.cod = esteCOD
>
>SELECT emails
> LOCATE FOR emails.cod = esteCOD
> DELETE FOR emails.cod = esteCOD
>
>
> thisform.refresh
> ENDIF
>******************************************************
>
>The problems
>
>It is appending all records from emails.dbf and not only the selected record
>in the grid line
>
>After deleting it does not go to the line I was in, but go to the end of the grid,
>even if I assign: LOCATE FOR emails.cod = esteCOD
Whatever it is your code is extremely redundant. Do it simple:
Select emails
scatter memo name oScatter
insert into email_ex from name oScatter
delete in emails
Edward Pikman
Independent Consultant