vb from子语句错误
这是小弟弄的一 查询 代码可是运行是总是提示错误,小弟初学vb 怎么看找都不知道哪里出了错 ,渴望得到到前辈们的指导,小弟万分感。
private Sub Command1_Click()
If Text1textbox = "" Then
Adodc1.RecordSource = "SELECT * FROM xsda"
Else
Select Case sel
Case 0
Adodc1.RecordSource = "SELECT * FROM xsda where xh='" & Text1text & "'"
Case 1
Adodc1.RecordSource = "SELECT * FROM xsda where xm='" & Text1text & "'"
Case 2
Adodc1.RecordSource = "SELECT * FROM xsda where xb='" & Text1text & "'"
Case 3
Data1.RecordSource = "SELECT * FROM xsda where nl='" & Text1text & "'"
Case 4
Adodc1.RecordSource = "SELECTt * FROM xsda where dh='" & Text1text & "'"
Case 5
Adodc1.RecordSource = "SELECT * FROM xsda where zzmm='" & Text1text & "'"
Case 6
Adodc1.RecordSource = "SELECT * FROM xsda where jg='" & Text1text & "'"
End Select
End If
Adodc1.Refresh
End Sub
Private Sub Option1_Click(Index As Integer)
sel = Index
Select Case Index
Case 0
Label1.Caption = "请输入学号"
Case 1
Label1.Caption = "请输入姓名"
Case 2
Label1.Caption = "请输入性别"
Case 3
Label1.Caption = "请输入年龄"
Case 4
Label1.Caption = "请输入电话"
Case 5
Label1.Caption = "请输入政治面貌"
Case 6
Label1.Caption = "请输入籍贯"
End Select
End Sub
[解决办法]
先看看例子吧
http://download.csdn.net/source/1425896
[解决办法]
你断点跟踪一下不就好了
[解决办法]