不知道这样行不行。写一个公共查询过程,如: public sub myQueryDef (QueryDefString as String,QueryDefField as String) dim strSql as StringstrSql = "select * from 你的表名 where "+QueryDefField +"='"+queryDefString+"'" .... .... End Sub调用时,如: Private txtName_KeyDown(..........) myQueryDef txtName.Text , "姓名" End Sub
txt()控件数组
txt_keydown(byval index as integer) select index .....
public sub myQueryDef (QueryDefString as String,QueryDefField as String)
dim strSql as StringstrSql = "select * from 你的表名 where "+QueryDefField +"='"+queryDefString+"'"
....
....
End Sub调用时,如:
Private txtName_KeyDown(..........)
myQueryDef txtName.Text , "姓名"
End Sub
txt_keydown(byval index as integer)
select index
.....