首页 > 解决方案 > 在 MS Access 中创建“通知气泡”

问题描述

我已经为此工作了一段时间,似乎无法弄清楚。我在 Microsoft Access 中有一个带有许多嵌入子表单的主页。其中一个子表单是最近的活动提要,类似于您在大多数社交媒体平台上看到的内容。它是一个带有“最近事件”和“注释”部分的选项卡式子目录。我试图在过去 24 小时内添加该子表单中的项目时出现“通知气泡”,然后在用户单击相应选项卡时消失。

“通知气泡”是一张名为“recentalert”的图片。目前,气泡仅在满足 24 小时标准时出现,但单击相应选项卡后我无法使其消失。我尝试了许多格式和不同的事件,但没有运气。我的代码如下。请帮忙!

    Private Sub Recent_Click()
        If Me.recentalert.Visible = True Then
            Me.recentalert.Visible = False
        End If
    End Sub

    Private Sub Form_Load
        If [Forms]![Navigation Form]![NavigationSub]![Activity Feed]![RAevents_frm].[Form].[today_date] >= Date -1 Then
            Me.recentalert.visible = True
        End If
    End Sub

标签: ms-accessvbams-access-2010ms-access-2013

解决方案


Try right clicking the control where you want the On Click event to fire and click on Build Event. This should take you to the Recent_Click sub in your module, if not, your control isn't properly linked and I would suggest deleting the sub in your module, using the right click method above, click on Code Builder, then retyping in your code.


推荐阅读