Any suggestion?

Any suggestion why the record not disappearing from the grid of Form when I press the delete (it indicates the deletion by black sign but not disappearing)

Thanks

#DEFINE MSGBOX_YES 6

#DEFINE C_MSGBOX1 36

#DEFINE C_DELETE_LOC "Are you sure you want to delete this record "

IF MESSAGEBOX(C_DELETE_LOC,C_MSGBOX1) = MSGBOX_YES

DELETE

IF !EOF()

SKIP 1

ENDIF

IF EOF() AND !BOF()

SKIP -1

ENDIF

THISFORM.Refresh

ENDIF



Answer this question

Any suggestion?

  • Maaloul

    Thank you very much all of you

    I thought it works perfect, but it's not.

    Because the deleted record appears with blak mark when form run's next time after exit.

    what's the right place to write this code "SET DELETED ON" before where it say "DELETE" or after..


  • jori0001

    Hi,

    Please check set deleted on | off

    Regards,

    Markish



  • asalcedo

    What's the data source If it's a view, you'll need to Tableupdate() the delete and then requery the view.

    But I also think SET DELETED is the culprit.

  • Josh Smith

    I set it in "Init" and it's work perfect now

    Thak you Dan


  • mohasad

    Set it in FORM.LOAD so it's always in effect for the form. Or, better, in your main program so it's in effect everywhere.

  • Any suggestion?