Private Sub command2_click() 
Adodc1.RecordSource = "select*form tushu where (用户名='高级管理员'and 密码 ='"&text2.text&"')" 
Adodc1.Refresh 
If Adodc1.Recordset.RecordCount = 0 Then 
MsgBox "用户或密码错误,请核对" 
Else 
Frame1.Visible = True 
End If 
End Sub 就是提示缺少语句结束
就是一个 找了 两天都没找到错误  网上查到的解决办法也解决不了   求求各位帮帮我这个菜鸟   select * from tushu where "用户名"='高级管理员' and 密码 ='"& text2.text &"' 
这个查询语句已经通过查询分析器的调试了  但是  不知道其他地方错在哪 

解决方案 »

  1.   

    晕啊  为什么错啊………………  我找到了个错  Form 错了  是 from     可是我该了后  还是  缺少语句结束
      

  2.   

    Private Sub command2_click()  
    Adodc1.RecordSource = "select*form tushu where ‘用户名’='高级管理员'and 密码 ='" & text2.text & "'"  
    End Sub 
    你只用这么多看还报错不,注意那些 & 旁边要有空格哈
      

  3.   

    这句是我在vb里试过的,没有问题的Adodc1.RecordSource = "select*form tushu where '用户名'='高级管理员' and  密码 ='" & text2.Text & "'"