Any suggestion?  
Author Message
acf





PostPosted: Visual FoxPro General, Any suggestion? Top

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



Visual FoxPro1  
 
 
Markish





PostPosted: Visual FoxPro General, Any suggestion? Top

Hi,

Please check set deleted on | off

Regards,

Markish



 
 
Dan Freeman





PostPosted: Visual FoxPro General, Any suggestion? Top

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.

 
 
acf





PostPosted: Visual FoxPro General, Any suggestion? Top

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..


 
 
Dan Freeman





PostPosted: Visual FoxPro General, Any suggestion? Top

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.

 
 
acf





PostPosted: Visual FoxPro General, Any suggestion? Top

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

Thak you Dan