就是登录框用COMBOX1下拉选取用户名,同时在SQL里面我做好了用户和密码的表,
请问怎么连接??
谢谢!

解决方案 »

  1.   

    SQLstr="select count(*) from user where userid='"& combo1.text &"' and userpwd='"& text1.text  &"'"
    这样写对吗?
      

  2.   

    先检索数据库,然后填充combo
    rs.open "select * from users",cn,1,3
    for i=0 to rs.roundcount-1
    combo1.additem rs("username")
    rs.movenext
    next
      

  3.   

    combo1.text="****"
    while rs.eof=false
    mbo1.additem rs.fieds(i).value
    rs.movenext
    loop
      

  4.   

    加载COMBO1里的用户名我在FROM—LOAD里就加载好了
    现在我只要选取一个用户名就能和我创建的表里的密码相同就行了!!
      

  5.   

    sub combo1_click()
       dim strsql as string
       strsql="select password,userid from user where userid='"& combo1.text 
       rs.open strsql,cn,3,3
       if not (rs.eof and rs.bof) then
               '比较密码   end ifend sub