if combobox1.Text='编号' then
begin
adoquery1.SQL.Clear;
adoquery1.Close;
adoquery1.SQL.Text:='select * from db_name where id='+edit1.Text+'';
adoquery1.Open;
请问上面那个代码,当combobox1.text='编号' 时我想让 edit1这个文本框只能输入数字,请问用什么办法能实现。
begin
adoquery1.SQL.Clear;
adoquery1.Close;
adoquery1.SQL.Text:='select * from db_name where id='+edit1.Text+'';
adoquery1.Open;
请问上面那个代码,当combobox1.text='编号' 时我想让 edit1这个文本框只能输入数字,请问用什么办法能实现。
解决方案 »
- ADOQuery1查询表的问题
- 蛋疼帖
- 制作这样复杂的界面
- 这是个什么错误Unable to expand?
- 请问我想写web中用的ActiveX来显示tif图片,用什么控件?
- 怎样得到另外一个程序中的某一edit控件的句柄?
- isapi 的dll在98 下可以操作注册表,为何在win2000下就不行呢?
- 有个问题想请教大家,参与者有分
- DCOMConnection的屬性server name 及guid 見不到注冊了的MTS/com+, 為什麼 ??
- 请问,在AdvstringGrid控件上的onEllipsClick事件是代表什么意思??
- 修复Access数据库?
- 问几个基本问题.各位一定帮我啊
begin
SetWindowLong(Edit1.Handle, GWL_STYLE,
GetWindowLong(Edit1.Handle, GWL_STYLE) or
ES_NUMBER);
end;
if not (key in ['0'..'9']) then key:=#0;
if (combobox1.Text='编号') and ((key <'0') or (key > '9')) and (key <> #8) then
key := #0;