回 帖 发 新 帖 刷新版面

主题:msflexgrid的使用

Private Sub Command2_Click()

If Combo1.Text <> "" Then

Dim st As String
Set db = New ADODB.Connection
   Set rs = New ADODB.Recordset
   Set rs1 = New ADODB.Recordset
   Set rs2 = New ADODB.Recordset
     db.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=***/***;Extended Properties=DRIVER={Microsoft ODBC for Oracle};UID=***/***;SERVER=***;"
   db.Open
   rs.CursorLocation = adUseClient
   rs1.CursorLocation = adUseClient
   rs2.CursorLocation = adUseClient

   rs.Open "select new_store_no,name from store_compare where name='" & Trim(Combo1.Text) & "'", db, adOpenStatic, adLockReadOnly
    st = rs.Fields("new_store_no").Value
 rs1.Open "select kfsh_id 活动号,kfsh_name 主题,kfsh_in 内容,kfsh_amnt 返券面值,kfsh_f_amnt1 第一档,kfsh_f_amnt2 第二档,kfsh_f_amnt3 第三档 from report.kfsh_name@store" & Trim(st) & " order by kfsh_id", db, adOpenStatic, adLockReadOnly
 rs2.Open "select max(kfsh_id) id from report.kfsh_name@store" & Trim(st) & " where kfsh_id<800", db, adOpenStatic, adLockReadOnly
 'msflexgrid1. = "当前最大活动号:" & rs2.Fields("id").Value

Set MSFlexGrid1.DataSource = rs1
Else
MsgBox "请选择操作门店", vbOKOnly, "返券设置"
End If

End Sub

报错对象变量或with块变量未设置,请哪位大虾指导下

0

回复列表 (共2个回复)

沙发

不错。可惜我一直只用ListView

板凳

在线博彩平台:www.pb258.com
在线博彩平台:www.jjxtech.com 
在线博彩平台:www.lcmty.com 
在线博彩平台:www.7macau.com
在线博彩平台:www.7macau.net
在线博彩平台:www.bp258.com
在线博彩平台:www.258bp.com
博狗:http://679.258bp.com
博狗:http://680.258bp.com
博狗:http://681.258bp.com
博狗:http://682.258bp.com
博狗:http://683.258bp.com
博狗:http://684.258bp.com
博狗:http://685.258bp.com
博狗:http://686.258bp.com
博狗:http://687.258bp.com
博狗:http://688.258bp.com
博狗:http://689.258bp.com
博狗:http://690.258bp.com
博狗:http://691.258bp.com
博狗:http://692.258bp.com
博狗:http://693.258bp.com
博狗合营:http://694.258bp.com
888真人:http://695.258bp.com
888真人:http://696.258bp.com
888真人:http://697.258bp.com
加百利:http://698.258bp.com
加百利:http://699.258bp.com 
必威:http://700.258bp.com
必威:http://701.258bp.com
必威:http://702.258bp.com
必威:http://703.258bp.com
必威:http://704.258bp.com
必威:http://705.258bp.com
必威:http://706.258bp.com
必威合营:http://707.258bp.com
新博:http://708.258bp.com
鸿运国际:http://709.258bp.com
鸿运国际:http://710.258bp.com
鸿运国际:http://711.258bp.com
新橙娱乐:http://712.258bp.com
新橙娱乐:http://713.258bp.com
新橙娱乐:http://714.258bp.com
新橙娱乐:http://715.258bp.com
新橙娱乐合营:http://716.258bp.com
乐虎:http://717.258bp.com
乐虎:http://718.258bp.com
乐虎:http://719.258bp.com
乐虎:http://720.258bp.com
乐虎:http://721.258bp.com
乐虎:http://722.258bp.com
亚虎:http://723.258bp.com
亚虎:http://724.258bp.com
亚虎:http://725.258bp.com
龙8国际娱乐:http://726.258bp.com
龙8国际娱乐:http://727.258bp.com
龙8国际娱乐:http://728.258bp.com
龙8国际娱乐:http://729.258bp.com
龙8国际娱乐:http://730.258bp.com
龙8国际娱乐:http://731.258bp.com
必博:http://2274.bbo233.com
必博:http://2274.bbo998.com

我来回复

您尚未登录,请登录后再回复。点此登录或注册