eform = "" if (systbl = 1) then
eform = SelectFrom("SELECT DOCFORM FROM AU_KOS21 WHERE (FILENAME='",tname,"')") elseif (systbl = 2) then
eform = SelectFrom("SELECT DOCFORM FROM AU_LOC21 WHERE (FILENAME='",tname,"')") elseif (systbl = 0) then
eform = SelectFrom("SELECT DOCFORM FROM AU_SYS21 WHERE (FILENAME='",tname,"')") endif
if (eform <> "") then
expr0 = strcat("WORK.",tname)
expr1 = strcat(rec_id,"=",tname) call OpenFormTop("ptEdit",eform,expr0,1,expr1) else call message("Undefined Form in Table ",tdescr) endif
rcount = TRecordCount(t) if (rcount > 0) then
nl = Escape(13,10,-1) call message("Cannot Delete Record!",nl,"There Are (",rcount,") Relations with other Tables!")
return endif
{.............delete the record..............}
flag = message_yes_no("Proceed with Deletion?") if (flag = 1) then
call ExecuteSQL("DELETE FROM [",__params[4],"] WHERE ([",__params[6],"]=",__params[5],")")