设计技术:
a、查询功能设计:
查询功能用了两个项目, 有时间段的查询还有对应的信息表各项进行相关查询, 其中用 了两个 check 控件来进行选择,利用 if 和 Select Case 条件从句来实额、应扣金额与实发工资的汇总。
相关代码分析如下:
Private Sub Comfind_Click() 查询统计商品销售信息 If Check1(0).Value = 0 And Check1(1).Value = 1 Then Select Case Combo2.text Case Is = "like"
Adodc1.RecordSource = "select * from 工资发放查询 where (工资发放查询."
&
Combo1.text &
"
like%+ "
+ Text1.text + "+%)"
Adodc1.Refresh Adodc2.RecordSource = "select sum(应发金额合计)as 应发金额合计 1,sum(应扣 金额合计)as 应扣金额合计 1,sum(实发金额)as 实发金额 1 from 工资发放查询 where (工 资发放查询."
&
Combo1.text &
"
like +%+ "
+ Text1.text + "+%)"
Adodc2.Refresh Case Is = "="
Adodc1.RecordSource = "select * from 工资发放查询 where (工资发放查询."
&
Combo1.text &
"
= "
+ Text1.text + ")"
Adodc1.Refresh Adodc2.RecordSource = "select sum(应发金额合计)as 应发金额合计 1,sum(应扣 金额合计)as 应扣金额合计 1,sum(实发金额)as 实发金额 1 from 工资发放查询 where (工 资发放查询."
&
Combo1.text &
"
= "
+ Text1.text + ")"
Adodc2.Refresh End Select End If If Check1(0).Value = 1 And Check1(1).Value = 0 Then28Adodc1.RecordSource = "select * from 工资发放查询 where 工资发放查询.发放 日期 between "
+ Str(DTP1.Value) + "AND "
+ Str(DTP2.Value) + ""
Adodc1.Refresh Adodc2.RecordSource = "select sum(应发金额合计)as 应发金额合计 1,sum(应扣 金额合计)as 应扣金额合计 1,sum(实发金额)as 实发金额 1 from 工资发放查询 where 工 资发放查询.发放日期 between "
本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/ruanjian/article-31446-38.html
那就是统一之时
>得道多助
有种就什么方便面都不要吃
我们的东风21