请问以下程序有何错?为何到语句
strBds = CboCxxm.List(CboCxxm.ListIndex) + "" & strYsh(cboYsh.ListIndex) & " " & txtCxxmz.Text&strType处就出现" 编译错误: 缺少: 语句结束 "删掉 &strType 后又可以了.Option Explicit
Dim strYsh(5) As String
Dim strBds, strType, strLjysh As String
Dim i As IntegerPrivate Sub CboCxxm_Click()
If CboCxxm.Text = "成绩" Then
vsbCjxq.Visible = True
Else
vsbCjxq.Visible = False
End If
txtCxxmz.Text = ""
End SubPrivate Sub cmdAdd_Click()
If txtCxxmz = "" Then
MsgBox "请输入适当的值", , "数据查询"
txtCxxmz.SetFocus
Else
If CboCxxm.ListIndex <= 4 Then
strType = Chr(34)
Else
strType = ""
End If
If OptLjysh(0).Value Then
strLjysh = "And"
Else
strLjysh = "Or"
End If
strBds = CboCxxm.List(CboCxxm.ListIndex) + "" & strYsh(cboYsh.ListIndex) & " " & txtCxxmz.Text&strtype
strBds = CboCxxm.List(CboCxxm.ListIndex) + "" & strYsh(cboYsh.ListIndex) & " " & txtCxxmz.Text&strType处就出现" 编译错误: 缺少: 语句结束 "删掉 &strType 后又可以了.Option Explicit
Dim strYsh(5) As String
Dim strBds, strType, strLjysh As String
Dim i As IntegerPrivate Sub CboCxxm_Click()
If CboCxxm.Text = "成绩" Then
vsbCjxq.Visible = True
Else
vsbCjxq.Visible = False
End If
txtCxxmz.Text = ""
End SubPrivate Sub cmdAdd_Click()
If txtCxxmz = "" Then
MsgBox "请输入适当的值", , "数据查询"
txtCxxmz.SetFocus
Else
If CboCxxm.ListIndex <= 4 Then
strType = Chr(34)
Else
strType = ""
End If
If OptLjysh(0).Value Then
strLjysh = "And"
Else
strLjysh = "Or"
End If
strBds = CboCxxm.List(CboCxxm.ListIndex) + "" & strYsh(cboYsh.ListIndex) & " " & txtCxxmz.Text&strtype
改成 txtCxxmz.Text & strtype