if Length(trim(dbEdit1.Text))<>8  then
    smd1.Caption := '系统提示';
   smd1.Text:= '输入的"学号"格式必须是8位数字,请重新输入!';
   smd1.ShowModal;
无论输入是不是8位数据,都有提示信息,为什么不进入判断呀!!
把条件改成>,<都是一样的.学号字段是字符型.请指点一下!!