[求助] 请问是哪里的错!~
以下是个登入界面的Command_Click事件,可总是说在user附近有语法错误,刚学vb实在不懂!~请高手指点一二!~Private Sub Command1_Click()
Dim cnn As New ADODB.Connection
cnn.ConnectionString = conn
cnn.Open
Connect
Dim rst As New ADODB.Recordset
Dim varsource As String, str As String
Set rst.ActiveConnection = cnn
str = Text1.Text
varsource = "select * from user where username='" + str + "'"
rst.Open varsource
If rst!userpwd = Text2.Text Then
MsgBox "»¶Ó½øÈëѧÉú¹ÜÀíϵͳ" '这里是中文“欢迎进入系统”
Else
try_time = try_time + 1
If try_time <= 3 Then
MsgBox "ÃÜÂë´íÎó£¬ÇëÖØÐÂÊäÈë" '中文是:"密码错误,在输入一次"
Exit Sub
Else
MsgBox "ÄúÒÑ´í3´Î£¬ÏµÍ³½«¹Ø±Õ" '中文是:“已经错3次,系统退出”
End If
End If
End Sub