先在IF前定义2个变量用来接收值:
dim username as string,pwd as string
username=txtusername.text
pwd=密码控件名.text
再在adoRs=adocon.execute(strSql)写:
Do while not adors.eof
      if adors(0) <> username then
      adors.movenext
      elseif adors(1)<>pwd then
      msgbox "密码错误之类的话"
      exit do
    end if
if adors.eof then
msgbox "没有此用户之类的话"
else
关闭记录集
关闭连接
窗体.show
end if
loop