if VarToStr(Table.FieldValues['field']) = '' then
begin
   showmessage('Rep ID is required.');
   edtRepID.setfocus();
end;

解决方案 »

  1.   

    windindance(风舞轻扬) ,我想问为何他的不行呀?
      

  2.   

    if edtRepID.text='' then ...
    应该也是行的
    可能其他什么事件中的代码不正确
      

  3.   

    if length(edtrepid.text)<1 then
    begin
    ....
    showmessage('输入错误');
    edtrepid.setfocus;
    end;
    就表示里面没有字符
      

  4.   

    to:windinance
    谢谢你多次帮我,也谢谢大家,
    今天回去试试,明天给分!!