以下是引用片段:
其代码实现如下: Private Sub btn添加_Click() '1.设置表格样式和标题 '2.以不同的查询模式更新显示列表 '3.计算业务量,总金额和交费金额 '1 Dim arrName() arrName = Array("业务代码", "客户名称", "消费日期", "总消费额(元)", "交费金额(元)", "操作员") Dim arrColwidth() arrColwidth = Array(2500, 2500, 2000, 1500, 1500, 1500) ddd.Cols = 6 ddd.Rows = 2 Dim i As Long For i = 0 To ddd.Cols - 1 ddd.ColWidth(i) = arrColwidth(i) ddd.TextMatrix(0, i) = arrName(i) ddd.TextMatrix(1, i) = "" Next ddd.Rows = 27 '2 If Me.Combo1.ListIndex = 0 Then Call UpdateDDD(ddd, ExecSql("select dc.ywid,dc.khmc,dc.xfrq,dc.zxfe,dc.jfje,ry.rymc from dc,ry" _ & " where dc.ryid=ry.ryid And dc.xfrq>='" & Me.DTPicker1.Value & "' And dc.xfrq<='" & Me.DTPicker2.Value & "'" _ & " and dc.khmc like '" & Me.Text1.Text & "%' and ry.rymc like'" & Me.Text2.Text & "%' And dc.jfje > 0")) Else Call UpdateDDD(ddd, ExecSql("select dc.ywid,dc.khmc,dc.xfrq,dc.zxfe,dc.jfje,ry.rymc from dc,ry" _ & " where dc.ryid=ry.ryid And dc.xfrq>='" & Me.DTPicker1.Value & "' And dc.xfrq<='" & Me.DTPicker2.Value & "'" _ & " and dc.khmc like '" & Me.Text1.Text & "%' and ry.rymc like'" & Me.Text2.Text & "%' And dc.jfje <= 0")) End If
|