改为SELECT循环选择模式:
Dim sqlstr As String
sqlstr = "Select * From" & " "
Select Case Combo1.Text
Case "一月"
sqlstr = sqlstr & "pzfx1"
Case "二月"
sqlstr = sqlstr & "pzfx2"
Case "三月"
sqlstr = sqlstr & "pzfx3"
Case "四月"
sqlstr = sqlstr & "F4"
Case "五月"
sqlstr = sqlstr & "F5"
Case "六月"
sqlstr = sqlstr & "F6"
Case "七月"
sqlstr = sqlstr & "F7"
Case "八月"
sqlstr = sqlstr & "F8"
Case "九月"
sqlstr = sqlstr & "F9"
Case "十月"
sqlstr = sqlstr & "F10"
Case "十一月"
sqlstr = sqlstr & "F11"
Case "十二月"
sqlstr = sqlstr & "F12"
End Select
Rst.Open sqlstr, conn, adOpenKeyset, adLockPessimistic
Call cc
End Sub
同样不行!
改为SELECT循环选择模式:
Dim sqlstr As String
sqlstr = "Select * From" & " "
Select Case Combo1.Text
Case "一月"
sqlstr = sqlstr & "pzfx1"
Case "二月"
sqlstr = sqlstr & "pzfx2"
Case "三月"
sqlstr = sqlstr & "pzfx3"
Case "四月"
sqlstr = sqlstr & "F4"
Case "五月"
sqlstr = sqlstr & "F5"
Case "六月"
sqlstr = sqlstr & "F6"
Case "七月"
sqlstr = sqlstr & "F7"
Case "八月"
sqlstr = sqlstr & "F8"
Case "九月"
sqlstr = sqlstr & "F9"
Case "十月"
sqlstr = sqlstr & "F10"
Case "十一月"
sqlstr = sqlstr & "F11"
Case "十二月"
sqlstr = sqlstr & "F12"
End Select
Rst.Open sqlstr, conn, adOpenKeyset, adLockPessimistic
Call cc
End Sub
同样不行!
我深刻地理解了骂粗口的那人(http://bbs.bc-cn.net/viewthread.php?tid=169210&extra=&page=2&page=)。有的时候就忍不住,人之常情。
你xxx的就不会自己把SQL语句打出来么
万一你Combo的值是""呢?
[此贴子已经被作者于2007-9-11 21:24:40编辑过]