设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
查看: 2840|回复: 6
打印 上一主题 下一主题

[报表] 报表高亮显示例子

[复制链接]
跳转到指定楼层
1#
发表于 2011-10-10 21:26:07 | 显示全部楼层 回帖奖励 |倒序浏览 |阅读模式
      报表高亮显示例子
   
  

  1. Public Sub HighlightControl(ByRef ctlControl As Control, _
  2.                             ByVal lngColour As Long, _
  3.                             ByVal sngAspect As Single)
  4.    
  5.     With ctlControl
  6.         
  7.         .BorderStyle = 0
  8.         
  9.         .Parent.Circle (.Left + .Width / 2, _
  10.                         .Top + .Height / 2), _
  11.                         .Width / 2 + 20, _
  12.                          lngColour, , , _
  13.                          sngAspect
  14.     End With

  15. End Sub



  16. Public Sub LineLightControl(ByRef ctlControl As Control, _
  17.                             ByVal lngColour As Long)
  18.    
  19.     With ctlControl
  20.         
  21.         .BorderStyle = 0
  22.         
  23.          .Parent.Line (.Left, .Top + .Height / 2 - 20)-(.Left + .Width, .Top + .Height / 2 - 20), lngColour
  24.         .Parent.Line (.Left, .Top + .Height / 2 + 20)-(.Left + .Width, .Top + .Height / 2 + 20), lngColour

  25.     End With

  26. End Sub



  27. Private Sub 主体_Format(Cancel As Integer, FormatCount As Integer)
  28. If Me.数量 > 40 Then
  29.         
  30.     HighlightControl Me.数量, vbRed, 0.35
  31.      
  32.   End If
  33.   


  34. If Me.折扣 > 0.1 Then

  35.    LineLightControl Me.折扣, vbBlue
  36. End If
  37. End Sub
复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏2 分享分享1 分享淘帖 订阅订阅
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-5-20 10:20 , Processed in 0.090634 second(s), 26 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表