数据库链接,你自己来sql="select * from DB where Names='" & Text1.text & "' and Pass='" & Text2.text & "'" "rs.open sql,conn,1,2if rs.RecordCount >0 then msgbox rs("Admins")end ifrs.closeconn.close