Results 1 to 13 of 13
  1. #1
    Adam M is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Oct 2018
    Posts
    7

    Creating a “Notification Bubble” in MS Access

    I have been working on this for a while now and cannot seem to figure it out. I have a home page in Microsoft Access with numerous embed subforms. One of these subforms is a recent activity feed similar to what you might see on most social media platforms. It is a tabbed subfrom with a "Recent Events" and a "Notes" section. I am trying to have a "Notification Bubble" appear when an item in that subform has been added in the last 24 hours, and THEN disappear when the user clicks on the corresponding tab.
    The "Notification Bubble" is a picture called "recentalert". Currently, the bubble only appears when the 24 hour criteria is met but I cannot get it to disappear once the corresponding tab is clicked. I have tried numerous formats and different events with no luck. My code is below. Please help!



    Private Sub Recent_Click()
    If Me.recentalert = True Then
    Me. recentalert = 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

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    I never use navigation forms but your code has a { instead of a [

    If you want to try using Windows style notifications AKA system tray alerts, have a look a this example on my website http://www.mendipdatasystems.co.uk/s...rts/4594398112
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    I would have a look here https://www.access-programmers.co.uk...d.php?t=295342 at the "Attention Seeking" demo databse - it may give you some ideas.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  4. #4
    Adam M is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Oct 2018
    Posts
    7
    Thank you for the response. The { was just a retype error on my part, the actual code is all square brackets. I thought about using tray notifications but they are not the best for my purposes as we have multiple unaffiliated systems open at a time.

  5. #5
    Adam M is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Oct 2018
    Posts
    7
    Thank you for the response. The { was just a retype error on my part, the actual code is all square brackets. I thought about using tray notifications but they are not the best for my purposes as we have multiple unaffiliated systems open at a time.

  6. #6
    Adam M is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Oct 2018
    Posts
    7
    Thank you. That program definitely has some interesting ideas and things I might use for later projects. Unfortunately it does not answer my problem. Instead of a message box or a count I am just trying to have an image that conditionally appears on form load and then is made invisible when its source tab is clicked. I feel like there should be an easy solution but I have had no luck.

  7. #7
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    You need to use the tab controls Change event to trigger the change there.
    BUT it will reappear every time the form is reloaded unless you store somewhere locally that the message has been dismissed.
    One route would be to store the latest dismissed time for each user, and check that against the other criteria and display the message based on that.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  8. #8
    Adam M is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Oct 2018
    Posts
    7
    Could you elaborate on how to use the Change event for this case? I don't believe I have used that before. And having it reappear when the form is reloaded is actually preferable. We have a rotating team that opens the program at the beginning of shift and closes it at the end. Having each user aware of an update when they log in to the program is helpful.

  9. #9
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Assuming the user opens the form on Tab Control page 1 , the OnChange event fires when they click on any other tab.
    You can get the page number activated and create events based on that. Remember that tabbed pages are simply an extension of the form they reside on, not a separate form.

    One of the reasons your other attempts at Form OnFocus didn't work is that a whole form can't receive focus unless it has no controls on it.
    It is always going to be a specific form control that gets focus.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  10. #10
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Just another thought.
    Perhaps you can use mouse move events to show what you want.
    For example see my answer and example in this post at AWF https://www.access-programmers.co.uk...6&postcount=13
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  11. #11
    Adam M is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Oct 2018
    Posts
    7
    Minty: I figured the focus was a problem somehow but didn't know enough to fix that. So the code for OnChange would essentially read the same as my current OnClick event?

    Ridders: I think a MouseOver event will be my fall back. I was hoping to do it via click to ensure the user actually selected and read the appropriate form but it would be better than a notification bubble that doesn't go away at all. It's interesting how you were able to hide and shrink the form with a button though, I was trying to figure that out for a different project.

  12. #12
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Quote Originally Posted by Adam M View Post
    Minty: I figured the focus was a problem somehow but didn't know enough to fix that. So the code for OnChange would essentially read the same as my current OnClick event?
    Yes pretty much so. If the code is on the form you are opening then you can dispense with the complicated form!subform etc references.
    Or look at using openargs property to pass the value in to the form on load.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  13. #13
    Adam M is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Oct 2018
    Posts
    7
    I thank everyone for the help I am dealing with some database corruption issues so I am having to put this on hold for a while. After doing some research I think part of the problem was that I didn't understand how Access structures a tabbed form. "Recent" probably should have referenced TabIndex = 0 instead so the OnChange fires when the tab is selected. Although the event procedure directed me to Recent_Click() I think this is incorrect.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 07-28-2017, 09:07 AM
  2. Cancel = True without the Access notification
    By GraeagleBill in forum Programming
    Replies: 3
    Last Post: 03-06-2017, 09:17 PM
  3. Notification in access?
    By Xterra14s in forum Access
    Replies: 3
    Last Post: 08-09-2016, 03:59 PM
  4. Email Notification
    By Ariuser in forum Programming
    Replies: 1
    Last Post: 01-20-2012, 03:44 PM
  5. Popup notification
    By imintrouble in forum Queries
    Replies: 1
    Last Post: 01-19-2012, 03:28 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums