在keydown事件中
 begin
     if key=13 then
        if messagedlg('是否保存',mtinformation,[mbyes,mbno],0)=mryes then
       yourtable.post;
 end;

解决方案 »

  1.   

    在keydown事件中
     begin
         if key=13 then
            if messagedlg('是否保存',mtinformation,[mbyes,mbno],0)=mryes then
           yourtable.post;
     end;
      

  2.   

    是 if key = #13 then
      

  3.   

    但我用的是query. 如何指定table呢???
      

  4.   

    if key = #13 then
    query1.post;祝:身体健康:!
      

  5.   

    这方法是能行. 但出来一个错误信息:
    could not perform the edit becaouse another user changed the record
    如何解决呢???