找出重复项,标记红色
时 间:2018-05-10 21:07:49
作 者:雨泉 ID:39037 城市:金昌
摘 要:重复项
正 文:
今天在网站找到一个比较好的东东,自己研究了一下,现在将我实现的效果和大家分享一下!!
图 示:
具体代码如下:
Dim ctl As Control
Dim rst As DAO.Recordset
Dim str As String
Set rst = Me.sfrList.Form.RecordsetClone
If rst.RecordCount > 0 Then rst.MoveFirst
Do Until rst.EOF
If DCount("*", "TMP_牛群转群日期", "乳牛号='" & rst!乳牛号 & "'") > 1 Then
str = str & "乳牛号='" & rst!乳牛号 & "' or "
End If
rst.MoveNext
Loop
If Len(str) > 0 Then
str = Left(str, Len(str) - 4)
End If
For Each ctl In Me.sfrList.Form
If ctl.ControlType = acTextBox or ctl.ControlType = acComboBox Then
ctl.FormatConditions.Add acExpression, acEqual, 1
ctl.FormatConditions(0).Modify acExpression, , str
ctl.FormatConditions(0).BackColor = vbRed
End If
Next
Access软件网官方交流QQ群 (群号:54525238) Access源码网店
常见问答:
技术分类:
源码示例
- 【源码QQ群号19834647...(12.17)
- 统计当月之前(不含当月)的记录...(03.11)
- 【Access Inputbo...(03.03)
- 按回车键后光标移动到下一条记录...(02.12)
- 【Access Dsum示例】...(02.07)
- Access对子窗体的数据进行...(02.05)
- 【Access高效办公】上月累...(01.09)
- 【Access高效办公】上月累...(01.06)
- 【Access Inputbo...(12.23)
- 【Access Dsum示例】...(12.16)

学习心得
最新文章
- 仓库管理实战课程(8)-商品信息功...(04.01)
- 仓库管理实战课程(7)-链接表(03.31)
- 仓库管理实战课程(6)-创建查询(03.29)
- 仓库管理实战课程(5)-字段属性(03.27)
- 设备装配出入库管理系统;基于Acc...(03.24)
- 仓库管理实战课程(4)-建表操作(03.22)
- 仓库管理实战课程(3)-需求设计说...(03.19)
- 仓库管理实战课程(2)-软件背景和...(03.18)
- 仓库管理实战课程(1)-讲师介绍(03.16)
- 统计当月之前(不含当月)的记录数怎...(03.11)