标题:[求助]怎么实现累加
只看楼主
chenlinyzy
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2007-6-14
 问题点数:0 回复次数:0 
[求助]怎么实现累加

请问各位朋友,这个程序怎么实现累加

Private Sub command1_Click()
Dim s As String
Dim k As Boolean
k = False
s = "select * from 工资表 where "
If Check1.Value Then
s = s + " 所属工资月份 like '%" + Combo1.Text + "%'"
k = True
End If
If Check2.Value Then
If k Then
s = s + " and 员工编号 like '%" + Text2.Text + "%'"
Else
s = s + " 员工编号 like '%" + Text2.Text + "%'"
End If
End If
If Check3.Value Then
If k Then
s = s + " and 员工姓名 like '%" + Text3.Text + "%'"
Else
s = s + " 员工姓名 like '%" + Text3.Text + "%'"
End If
End If

If Check1.Value = 0 And Check2.Value = 0 And Check3.Value = 0 Then
s = "select * from 工资表 where 1=2"
End If
Adodc1.RecordSource = s
Adodc1.Refresh
End Sub

Private Sub Command2_Click()
Frmgzdyin.Show

End Sub

Private Sub command3_Click()
DE.rs工资表.MovePrevious
If DE.rs工资表.BOF Then
DE.rs工资表.MoveFirst
End If

End Sub

Private Sub Command4_Click()
DE.rs工资表.MoveNext
If DE.rs工资表.EOF Then
DE.rs工资表.MoveLast
End If
End Sub

Private Sub command5_Click()
DE.rs工资表.AddNew

End Sub

Private Sub Command6_Click()
If MsgBox("确实要删除吗?", vbQuestion + vbYesNo, "提示") = vbYes Then
DE.rs合同表.Delete
Command4_Click
End If

End Sub

Private Sub Form_Load()

End Sub

搜索更多相关主题的帖子: 累加 
2007-06-15 10:03



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




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

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