VB编程提示.RecordSource = c语言程序错误怎么找?

搜索IT技术Private Sub Command2_Click()
Dim jsql
jsql = ""
Dim smyregion As String
If Check1.Value = 1 Then
jsql = "姓名 like'%" + Text1.Text + "%'"
End If
If Check2.Value = 1 Then
If jsql = "" Then
jsql = "学号 like'%" + Text2.Text + "%'"
Else
jsql = jsql & "and 姓名 like'%" + Text2.Text + "%'"
End If
End If
If jsql = "" Then
MsgBox "请选择查询条件!", vbInformation, "精确查找"
Exit Sub
Else
Adodc1.RecordSource = "select*from 学生信息 where" & jsql
Adodc1.Refresh
End If
If Adodc1.Recordset.RecordCount > 0 Then
Set DataGrid1.DataSource = Adodc1
End If
End Sub
Private Sub Command1_Click()
Unload Me
End Sub
最佳答案
本回答由达人推荐
你的每个回答都是帮助,马上参与置顶

我要回帖

更多关于 c语言程序错误怎么找 的文章

 

随机推荐