privte sub command1_click()
if text4.text=""   then
msgbox"ادخل رقم الموظف",vbokcancel,"تنبيه"
text4.setfocus
else
connect
rs.open"select * from emp order by Emp_no",db,adopenststic,adLockPessimistic
if rs.recordcount>0 then 
       Do While rs.recordset.EOF then 
       rs.movefirst
          if text4.text=rs.Fields("Emp_No") then 
           Tx_no.text=rs.Fields("Emp_no") 
           Tx_name.text=rs.Fields("Emp_name")
           Tx_jobname.text=rs.Fields("Emp_jobname")
          end if
          rs.movenext 
       loop 
end if
end sub      