SELECT table1
SEEK ALLTRIM(THISFORM.idcode.Value)+ALLTRIM(THISFORM.idcode2.Value)
IF FOUND()
SELECT table1
DELETE
WAIT WINDOW 'Record has been deleted.'
THISFORM.Refresh
ELSE
WAIT WINDOW Record does not exist'
ENDIF
SELECT table1
I am assuming you have the order selected for the seek in the properties, if not you will need a:
SET ORDER TO TAG
after the select
I find that IF FOUND() and IF (.not. EOF()) don't always work too smooth, so I would try checking to see if your find matched instead:
IF ALLTRIM(THISFORM.idcode.Value) = alltrim(table1.field1) .and. ALLTRIM(THISFORM.idcode2.Value) = alltrim(table1.field2)
If these do not work, put a SET STEP ON right before the seek and put the table values in your watch window to see where they are after the seek.
``` Appreciate a normal day, it is always better than a bad one ```
Kev