1.
用Like就可以吧,但好象MEMO字段用like就不行,要用instr()函数来判断才行.
2.在表单的KeyPress事件中,加上如下代码,另外,表单的KeyPreview要设为True.
if key=#13 then
if (ActiveControl is TDBGrid) then
with TDBGrid(ActiveControl) do
if selectedindex<(fieldcount-1) then
selectedindex:=selectedindex+1
else
selectedindex:=0;
end;