In the text1.KeyUp event,filter the Enter key,and write the code like this:
set rs=cn.execute("Select name from table where ID='" & text1 & "'")
if not rs.eof then text2=rs(0) & ""
set rs=cn.execute("Select name from table where ID='" & text1 & "'")
if not rs.eof then text2=rs(0) & ""
解决方案 »
- 局域网内加载宏自动更新问题求教
- 大家看看這段對PowerPoint操作的代碼是什么意思?
- 200元请人做个超简单的外挂,有兴趣的请进~
- 高分:导出日期字段到excel里面出错的问题
- 请教关于打印
- CallWindowProc函数调用错误,程序关闭,大侠帮忙啊
- ****VB与SQL SERVER之间的奇怪问题~~!!
- 要用data控件连接一个access2000数据库(设有密码“xbxb”),并且,设置几个文本框绑定字段,但是在设置data的recordsource属性时,提示
- 求助怎么样把数据输到list数据类型里
- 请教一个checkbox的问题
- 我用printer对像中的 form1.printform ,有问题?
- 急!急!急!安装程序错误3633。
set rs=cn.execute("Select name from table where ID='" & text1 & "'"
if not rs.eof then text2=rs(0) &""
也可以在text1的validate事件里放入上面的代码,这样就只有在text失去焦点前才查找。