| 发表于:2007-05-22 16:28:327楼 得分:0 |
我现在改变想法了,想设计两个main页面 管理员用户进后是一个,而一般用户进来后是另一个 具体代码如下:提示错误为 实时错误3265 在对应所需名称或序数的集合中,未找到项目 private sub command1_click() adodc1.recordsource = " 用户表 where 用户名= ' " & datacombo1.boundtext & " ' " adodc1.refresh if datacombo1.boundtext <> " " and text1.text <> " " and text1.text = adodc1.recordset.fields( "密码 ") and adodc1.recordset.fields( "用户类型 ") = "管理员 " then main.show unload me if datacombo1.boundtext <> " " and text1.text <> " " and text1.text = adodc1.recordset.fields( "密码 ") and adodc1.recordset.fields( "用户类型 ") = "用户 " then //错误所处 main1.show unload me else if tim = 3 then myval = msgbox( "密码输入错误已达3次,请想系统管理员查询! ", 0, " ") if myval = vbok then end end if if datacombo1.boundtext = " " then msgbox ( "请输入操作员! ") datacombo1.setfocus else if datacombo1.boundtext <> adodc1.recordset.fields( "用户名 ") then msgbox ( "查无此操作员!,请重新输入操作员! ") datacombo1.setfocus else if text1.text = " " then msgbox ( "请输入操作员密码! ") text1.setfocus else if text1.text <> adodc1.recordset.fields( "密码 ") then msgbox ( "密码错误,请重新输入密码! ") tim = tim + 1 text1.setfocus end if end if end if end if end if end if end sub 请各位大侠多多指点,非常感谢! | | |
|