显示 语法错误(操作符丢失)在查询表达式“from 学生信息表”中
PrivateSubCommand1_Click()Dims1AsStringDims_idAsStringDims_namAsStringsql="Provider=M...
Private Sub Command1_Click()
Dim s1 As String
Dim s_id As String
Dim s_nam As String
sql = "Provider=Microsoft.jet.oledb.4.0;Data source=" & App.Path & "\驾驶员理论考试.mdb"
conn.Open sql
If Text1.Text = "" Then
s_id = "%"
Else
s_id = Text1.Text
End If
If Text2.Text = "" Then
s_nam = "%"
Else
s_nam = Text2.Text
End If
s1 = "select * from 考生信息表 where 姓名= '" & s_id & "'"
Adodc1.RecordSource = s1
Adodc1.Refresh
End Sub 展开
Dim s1 As String
Dim s_id As String
Dim s_nam As String
sql = "Provider=Microsoft.jet.oledb.4.0;Data source=" & App.Path & "\驾驶员理论考试.mdb"
conn.Open sql
If Text1.Text = "" Then
s_id = "%"
Else
s_id = Text1.Text
End If
If Text2.Text = "" Then
s_nam = "%"
Else
s_nam = Text2.Text
End If
s1 = "select * from 考生信息表 where 姓名= '" & s_id & "'"
Adodc1.RecordSource = s1
Adodc1.Refresh
End Sub 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询