1. i get variable'tnrecord' is not foundOn which line of code does the error occur? Are you passing nRecNo from the grid's Deleted() method to your DeleteRecord() method?
2.deleteted(), method mean procedure deleted at mygridYes. MyGrid.Deleted()
3. it but this code undee procedure deleted at mygridAre you saying that this is the code you have in your MyGrid.Deleted() method? The rule of thumb is "Code in methods, not events" This means that the native Deleted() event of the grid should always call a custom method and not have code in it.
Personally, I think you really ought to get a copy of
Fundamentals: Building Visual Studio Applications on a Visual FoxPro 6.0 Foundation if you are serious about developing applications in VFP. It is apparent to me that you are just starting to learn the language. Although answers that you receive on this forum will help you solve specific problems, it is no substitute for the learning that you must do on your own.