给你个参考
procedure Twin_hbjl.Edit3KeyPress(Sender: TObject; var Key: Char);
begin
if not(key in ['0'..'9'])and not(key=Chr(vk_Back))and not(key=#13) then
begin
showmessage(' 请输入数字 ');
exit;
end;
if key=#13 then
button1.SetFocus;
end;
如果找不到日期型字段的触发时间话,那就不要直接在DBGrid中输入吧,用EDIT输入,麻烦点