标题:如何把COMBO1控件里的LIST一月、二月、三月、四月与DB1里的F1表、F2表、F3表 ...
只看楼主
multiple1902
Rank: 8Rank: 8
等 级:贵宾
威 望:42
帖 子:4881
专家分:671
注 册:2007-2-9
得分:0 
VB棒棒……可以像excel一样按序填充的哦……
2007-09-11 20:34
lijun337
Rank: 1
等 级:新手上路
帖 子:379
专家分:5
注 册:2006-4-12
得分:0 
什么意思?

能详细解释下么?
2007-09-11 21:02
lijun337
Rank: 1
等 级:新手上路
帖 子:379
专家分:5
注 册:2006-4-12
得分:0 

但转查询选择第二个月份时,出现对象打开时,,不能操作!

不知道RST。CLOSE放在哪好,试了几次!
都不行!

2007-09-11 21:15
lijun337
Rank: 1
等 级:新手上路
帖 子:379
专家分:5
注 册:2006-4-12
得分:0 

改为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

同样不行!

2007-09-11 21:16
multiple1902
Rank: 8Rank: 8
等 级:贵宾
威 望:42
帖 子:4881
专家分:671
注 册:2007-2-9
得分:0 
以下是引用lijun337在2007-9-11 21:16:07的发言:

改为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编辑过]

2007-09-11 21:21



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-168415-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.021059 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved