Private Sub Command1_Click()
If Option1.Value = True Then
Adodc1.RecordSource = "select * from shouruxinxi where 班級 ='" & Text1.Text & "'"
End If
Adodc1.Refresh
運行時,總是說這里有錯誤”If Option2.Value = True Then
Adodc1.RecordSource = "select * from shouruxinxi where 收入時間='" & Format(Text2.Text, "yyyy-mm-dd") & "'"
Adodc1.Refresh
運行時,總是說這里有錯誤”Else
n = MsgBox("輸入日期格式不正確,請重新輸入!", vbOKOnly, "")
Text2.Text = ""
Adodc1.RecordSource = "select * from shouruxinxi where 收入時間='" & Format(Text2.Text, "yyyy-mm-dd") & "'"
End If
Adodc1.Refresh
“運行時,總是說這里有錯誤”End Sub
uj5u.com熱心網友回復:
錯誤的內容是什么?uj5u.com熱心網友回復:
你這代碼邏輯有問題............uj5u.com熱心網友回復:
我這是一個查詢界面,有兩個選項:1、按班級查詢,2、按收入時間查詢,在運行時總說語法不對轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/99698.html
標籤:VB基礎類
上一篇:求大神解決,vb呼叫flash,flash中有FLVPlayback進行引入外部視頻,如何是FLVPlayback全屏播放,設定其位置
下一篇:VB編程生成Word檔案
