LPARAMETERS nRecNo local lcRecordSource, lnSelect lcRecordSource = This.RecordSource lnSelect = select() select (lcRecordSource) with This if .RecordSourceType < 2 goto record nRecNo .SetFocus() .Parent.Refresh() if .lWarning && custom property of the grid local lnRetVal, lcMessage lcMessage = "Are you sure you want to delete the record?" lnRetval = MessageBox(lcMessage, MB_ICONSTOP + MB_YESNO ; + MB_DEFBUTTON2, "WARNING") if lnRetVal <> IDYES NoDefault select (lnSelect) return 0 endif endif delete next 1 skip -1 if bof() locate endif .Refresh() endif endwith NoDefault select (lnSelect) Return