以下是个登入界面的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 "&Atilde;&Uuml;&Acirc;&euml;&acute;í&Icirc;ó&pound;&not;&Ccedil;&euml;&Ouml;&Oslash;&ETH;&Acirc;&Ecirc;&auml;&Egrave;&euml;" '中文是:"密码错误,在输入一次"
            Exit Sub
        Else
            MsgBox "&Auml;ú&Ograve;&Ntilde;&acute;í3&acute;&Icirc;&pound;&not;&Iuml;&micro;&Iacute;&sup3;&frac12;&laquo;&sup1;&Oslash;±&Otilde;" '中文是:“已经错3次,系统退出”
        End If
    End If