in text1.KeyUp event,filter the Enter key,and write code like this:
set rs=cn.execute("Select name from table where ID='" & text1 & "'"
if not rs.eof then text2=rs(0) &""
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) & ""