<form id="hbx9t"></form>

<noframes id="hbx9t">

    <em id="hbx9t"><span id="hbx9t"></span></em>

        <noframes id="hbx9t"><address id="hbx9t"><th id="hbx9t"><progress id="hbx9t"></progress></th></address>
        office交流網--QQ交流群號

        Access培訓群:792054000         Excel免費交流群群:686050929          Outlook交流群:221378704    

        Word交流群:218156588             PPT交流群:324131555

        access在報表中把符合條件的數據圈出來

        2020-09-01 08:00:00
        tmtony8
        原創
        15352

        在報表展示的數據中,我們有時希望突出顯示某些符合條件的數據。

        對于數據高亮顯示,比較簡單的辦法可以通過條件格式??梢栽O置各種突出的樣式

        這里介紹一下在報表中,把指定范圍的數據集 用橢圓圈釋出來


        通過下面代碼,把價錢小于等于5的價錢用紅色的橢圓圈出來

        Private Sub 主體_Format(Cancel As Integer, FormatCount As Integer)
            Dim sH As Single
            Dim sV As Single
            Dim sW As Single
         
            If Me.價錢<= 5 Then 
             With Me.價錢 
               sH = .Left + .Width / 2 '橢圓的位置 
               sV = .Top + .Height / 2 sW = .Width / 2 '設置橢圓的寬度 
             End With 
             Me.Circle (sH, sV), sW, vbRed, , , 0.3 '畫橢圓 
            End If 
        End Sub 
        


        此代碼主要是通過定位到指定條件的位置,用Circle函數畫出指定大小的橢圓

        分享