Code: Select all
on RawKeyDown key
if (key = 65288) OR (key = 65535) then
if (the selectedField <> EMPTY) AND (the cControlType of the selectedField <> "label") AND (the ShowWarningWhenDeletingARecord of stack "dbdPreferences") then
answer "<p><b>Are you sure you want to delete this column?</b></p><p></p><p>This will delete the current column from the database and you cannot undo this action.</p>" with "Delete" or "Cancel" as sheet
if (it is "Cancel") then
exit RawKeyDown
else
pass RawKeyDown
end if
end if
else
pass RawKeyDown
end if
end RawKeyDown