Go Back   Access World Forums > Microsoft Access Reference > Sample Databases

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 08-02-2017, 04:18 PM   #1
ridders
Newbee moderator
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 5,536
Thanks: 79
Thanked 1,373 Times in 1,282 Posts
ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough
Create system tray alerts in Access

This database demonstrates how you can use Access to create popup messages in the system tray notifications area. This is ideal if you want to alert users to issues such as:
• Product support or licence about to expire
• A new version available on the program website

The idea for this project came from the following thread:
https://www.access-programmers.co.uk...d.php?t=294849

The balloon tooltips code is not mine - if anyone recognises it as their own work, please let me know & I will add your details to the code

The main form in the DEMO database is shown below:



Popup messages similar to these will be displayed in the system tray notifications area





NOTE Screenshots done in Windows 10. Messages look different in earlier Windows versions
===============================================

To use this code with your own databases:

1. Add the VBA reference 'Microsoft Internet Controls'
2. Import and adapt the table tblLocalVariables
Alternatively, adapt the code to use similar data in another table of your own
3. Import all 5 modules
4. Modules modFunctions & modInternetDownload are used for the version check
The main version check code is contained in the procedure: CheckLatestWebVersion in modFunctions.
This ‘reads’ the contents of a specified webpage to a temporary text file and searches it for a specified string from which the web version number is extracted
The web version is then compared with the local version number
You will need to ADAPT the code as necessary to suit your own database and website
5. The form also contains a non ActiveX calendar form frmDatePicker which will work in 32-bit or 64-bit Access. The code for this is in modDatePicker
6. The balloon tooltips code is contained in a standard module modBalloonTooltip and a class module BalloonTooltip.
Copy both modules to your project to use this idea

Each message needs a single line of code e.g.

Code:
ShowBalloonTooltip "INFO - New version available", GetProgramName() & " version " & intWebVer 
& " is available for download from the " & GetCompanyName() & " website", btWarning
An extra form frmBalloonTooltip is also provided so you can test the functionality for yourself:

For further information, see the attached PDF file (zipped)
If you have any questions, respond to this thread or send me a PM.

NOTE: the balloon tooltips code doesn't work in 64-bit Access. I will investigate this further at some point in the future
Attached Images
File Type: png MainForm.png (33.1 KB, 2076 views)
File Type: png ExpiryDateSoon.png (16.7 KB, 1545 views)
File Type: png NewVersionMessage.png (19.4 KB, 1506 views)
Attached Files
File Type: accdb SystemTrayAlert.accdb (844.0 KB, 397 views)
File Type: zip Creating System Tray Alerts in Access.zip (834.5 KB, 449 views)

__________________
Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left and leave a comment.

New example databases:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


-------------------------
nil illegitimi carborundum est

Last edited by ridders; 10-17-2017 at 11:04 AM. Reason: Added comment about 64-bit Access
ridders is offline   Reply With Quote
The Following 4 Users Say Thank You to ridders For This Useful Post:
Juleehz (05-29-2018), murray83 (08-03-2017), riti90 (05-23-2018), usm01 (08-03-2017)
Old 10-17-2017, 05:09 AM   #2
lelo28
Newly Registered User
 
Join Date: Oct 2017
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
lelo28 is on a distinguished road
Re: Create system tray alerts in Access

Hello,
I tested the example with Win 10 64 bit and Office 2016 64 bit and it did not work.
I tested with Win 10 and Office 2016 32 bit and it also did not work.
It did not show any error and I even changed some API's to run in 64 bits, but without success.
Do you have any suggestions?

Thank you

Greetings from Brazil

Marcelo
lelo28 is offline   Reply With Quote
Old 04-30-2018, 12:26 AM   #3
el.alcalde
Newly Registered User
 
Join Date: Apr 2018
Location: GermanY
Posts: 13
Thanks: 2
Thanked 0 Times in 0 Posts
el.alcalde is on a distinguished road
Re: Create system tray alerts in Access

Thanks a lot for the nice example,
I am wondering whether there is a way to
* change the Foregrround /BackGround colors (Black on yellow) of the tray
alert window also its

* to be able to click the icon in the tray (after disappearing of the alert) to retain
the last message

Thanks again and have a nice day
(01 May is the day of work)

el.alcalde is offline   Reply With Quote
Old 05-23-2018, 04:53 AM   #4
riti90
Newly Registered User
 
Join Date: Dec 2017
Location: Cambridge, United Kingdom
Posts: 20
Thanks: 10
Thanked 2 Times in 2 Posts
riti90 is on a distinguished road
Re: Create system tray alerts in Access

Quote:
Originally Posted by ridders View Post
This database demonstrates how you can use Access to create popup messages in the system tray notifications area. This is ideal if you want to alert users to issues such as:
• Product support or licence about to expire
• A new version available on the program website

The idea for this project came from the following thread:
https://www.access-programmers.co.uk...d.php?t=294849

The balloon tooltips code is not mine - if anyone recognises it as their own work, please let me know & I will add your details to the code

The main form in the DEMO database is shown below:



Popup messages similar to these will be displayed in the system tray notifications area





NOTE Screenshots done in Windows 10. Messages look different in earlier Windows versions
===============================================

To use this code with your own databases:

1. Add the VBA reference 'Microsoft Internet Controls'
2. Import and adapt the table tblLocalVariables
Alternatively, adapt the code to use similar data in another table of your own
3. Import all 5 modules
4. Modules modFunctions & modInternetDownload are used for the version check
The main version check code is contained in the procedure: CheckLatestWebVersion in modFunctions.
This ‘reads’ the contents of a specified webpage to a temporary text file and searches it for a specified string from which the web version number is extracted
The web version is then compared with the local version number
You will need to ADAPT the code as necessary to suit your own database and website
5. The form also contains a non ActiveX calendar form frmDatePicker which will work in 32-bit or 64-bit Access. The code for this is in modDatePicker
6. The balloon tooltips code is contained in a standard module modBalloonTooltip and a class module BalloonTooltip.
Copy both modules to your project to use this idea

Each message needs a single line of code e.g.

Code:
ShowBalloonTooltip "INFO - New version available", GetProgramName() & " version " & intWebVer 
& " is available for download from the " & GetCompanyName() & " website", btWarning
An extra form frmBalloonTooltip is also provided so you can test the functionality for yourself:

For further information, see the attached PDF file (zipped)
If you have any questions, respond to this thread or send me a PM.

NOTE: the balloon tooltips code doesn't work in 64-bit Access. I will investigate this further at some point in the future

Hi,
I think this is an extra bit for 64 bit that could be handy :
Code:
Option Compare Database
Option Explicit

Private mlngIcon As Long
Private mstrHeading As String
Private mstrMessage As String

Private Const APP_SYSTRAY_ID = 999

Private Const NOTIFYICON_VERSION = &H3

Private Const NIF_MESSAGE = &H1
Private Const NIF_ICON = &H2
Private Const NIF_TIP = &H4
Private Const NIF_STATE = &H8
Private Const NIF_INFO = &H10

Private Const NIM_ADD = &H0
Private Const NIM_MODIFY = &H1
Private Const NIM_DELETE = &H2
Private Const NIM_SETFOCUS = &H3
Private Const NIM_SETVERSION = &H4
Private Const NIM_VERSION = &H5

Private Const NIS_HIDDEN = &H1
Private Const NIS_SHAREDICON = &H2

Private Const NIIF_NONE = &H0
Private Const NIIF_INFO = &H1
Private Const NIIF_WARNING = &H2
Private Const NIIF_ERROR = &H3
Private Const NIIF_GUID = &H5
Private Const NIIF_ICON_MASK = &HF
Private Const NIIF_NOSOUND = &H10
   
Private Const WM_USER = &H400
Private Const NIN_BALLOONSHOW = (WM_USER + 2)
Private Const NIN_BALLOONHIDE = (WM_USER + 3)
Private Const NIN_BALLOONTIMEOUT = (WM_USER + 4)
Private Const NIN_BALLOONUSERCLICK = (WM_USER + 5)

Private Const NOTIFYICONDATA_V1_SIZE As Long = 88
Private Const NOTIFYICONDATA_V2_SIZE As Long = 488
Private Const NOTIFYICONDATA_V3_SIZE As Long = 504
Private NOTIFYICONDATA_SIZE As Long

Private Type GUID
   Data1 As Long
   Data2 As Integer
   Data3 As Integer
   Data4(7) As Byte
End Type
#If VBA7 Then
Private Type NOTIFYICONDATA
  cbSize As Long
  hwnd As LongPtr
  uID As Long
  uFlags As Long
  uCallbackMessage As Long
  hIcon As LongPtr
  szTip As String * 128
  dwState As Long
  dwStateMask As Long
  szInfo As String * 256
  uTimeoutAndVersion As Long
  szInfoTitle As String * 64
  dwInfoFlags As Long
  guidItem As GUID
End Type
#Else
Private Type NOTIFYICONDATA
  cbSize As Long
  hwnd As Long
  uID As Long
  uFlags As Long
  uCallbackMessage As Long
  hIcon As Long
  szTip As String * 128
  dwState As Long
  dwStateMask As Long
  szInfo As String * 256
  uTimeoutAndVersion As Long
  szInfoTitle As String * 64
  dwInfoFlags As Long
  guidItem As GUID
#End If


#If VBA7 Then

Private Declare PtrSafe Function Shell_NotifyIcon Lib "shell32.dll" _
   Alias "Shell_NotifyIconA" _
  (ByVal dwMessage As LongPtr, _
   lpData As NOTIFYICONDATA) As LongPtr

Private Declare PtrSafe Function GetFileVersionInfoSize Lib "version.dll" _
   Alias "GetFileVersionInfoSizeA" _
  (ByVal lptstrFilename As String, _
   lpdwHandle As Long) As Long

Private Declare PtrSafe Function GetFileVersionInfo Lib "version.dll" _
   Alias "GetFileVersionInfoA" _
  (ByVal lptstrFilename As String, _
   ByVal dwHandle As LongPtr, _
   ByVal dwLen As LongPtr, _
   lpData As Any) As Long
   
Private Declare PtrSafe Function VerQueryValue Lib "version.dll" _
   Alias "VerQueryValueA" _
  (pBlock As Any, _
   ByVal lpSubBlock As String, _
   lpBuffer As Any, _
   nVerSize As Long) As LongPtr

Private Declare PtrSafe Sub CopyMemory Lib "kernel32" _
   Alias "RtlMoveMemory" _
  (Destination As Any, _
   Source As Any, _
   ByVal Length As LongPtr)
#Else
Private Declare Function Shell_NotifyIcon Lib "shell32.dll" _
   Alias "Shell_NotifyIconA" _
  (ByVal dwMessage As Long, _
   lpData As NOTIFYICONDATA) As Long

Private Declare Function GetFileVersionInfoSize Lib "version.dll" _
   Alias "GetFileVersionInfoSizeA" _
  (ByVal lptstrFilename As String, _
   lpdwHandle As Long) As Long

Private Declare Function GetFileVersionInfo Lib "version.dll" _
   Alias "GetFileVersionInfoA" _
  (ByVal lptstrFilename As String, _
   ByVal dwHandle As Long, _
   ByVal dwLen As Long, _
   lpData As Any) As Long
   
Private Declare Function VerQueryValue Lib "version.dll" _
   Alias "VerQueryValueA" _
  (pBlock As Any, _
   ByVal lpSubBlock As String, _
   lpBuffer As Any, _
   nVerSize As Long) As Long

Private Declare Sub CopyMemory Lib "kernel32" _
   Alias "RtlMoveMemory" _
  (Destination As Any, _
   Source As Any, _
   ByVal Length As Long)
#End If

Private Const WM_GETICON = &H7F
                                 
Private Const WM_SETICON = &H80
Private Const IMAGE_BITMAP = 0
Private Const IMAGE_ICON = 1
Private Const IMAGE_CURSOR = 2
Private Const LR_LOADFROMFILE = &H10
                                          
Private Const ICON_SMALL = 0&
Private Const ICON_BIG = 1&

#If VBA7 Then

Private Declare PtrSafe Function apiLoadImage Lib "user32" _
   Alias "LoadImageA" _
   (ByVal hInst As LongPtr, _
   ByVal lpszName As String, _
   ByVal uType As LongPtr, _
   ByVal cxDesired As LongPtr, _
   ByVal cyDesired As LongPtr, _
   ByVal fuLoad As LongPtr) _
   As Long

Private Declare PtrSafe Function apiSendMessageLong Lib "user32" _
   Alias "SendMessageA" _
   (ByVal hwnd As LongPtr, _
   ByVal wMsg As Long, _
   ByVal wParam As LongPtr, _
   ByVal lParam As LongPtr) _
   As LongPtr
#Else
Private Declare Function apiLoadImage Lib "user32" _
   Alias "LoadImageA" _
   (ByVal hInst As Long, _
   ByVal lpszName As String, _
   ByVal uType As Long, _
   ByVal cxDesired As Long, _
   ByVal cyDesired As Long, _
   ByVal fuLoad As Long) _
   As Long

Private Declare Function apiSendMessageLong Lib "user32" _
   Alias "SendMessageA" _
   (ByVal hWnd As Long, _
   ByVal wMsg As Long, _
   ByVal wParam As Long, _
   ByVal lParam As Long) _
   As Long
#End If
Private Const SHGFI_ICON = &H100
Private Const SHGFI_DISPLAYNAME = &H200
Private Const SHGFI_TYPENAME = &H400
Private Const SHGFI_ATTRIBUTES = &H800
Private Const SHGFI_ICONLOCATION = &H1000

Private Const FILE_ATTRIBUTE_NORMAL = &H80
Private Const MAX_PATH = 260

Private Type SHFILEINFO
   hIcon As LongPtr
   iIcon As LongPtr
   dwAttributes As LongPtr
   szDisplayName As String * MAX_PATH
   szTypeName As String * 80
End Type

#If VBA7 Then
Private Declare PtrSafe Function apiSHGetFileInfo Lib "shell32.dll" _
   Alias "SHGetFileInfoA" _
   (ByVal pszPath As String, _
    ByVal dwFileAttributes As LongPtr, _
    psfi As SHFILEINFO, _
    ByVal cbSizeFileInfo As LongPtr, _
    ByVal uFlags As LongPtr) _
    As LongPtr
        
Private Declare PtrSafe Function apiDestroyIcon Lib "user32" _
   Alias "DestroyIcon" _
   (ByVal hIcon As LongPtr) _
   As LongPtr
#Else
Private Declare Function apiSHGetFileInfo Lib "shell32.dll" _
   Alias "SHGetFileInfoA" _
   (ByVal pszPath As String, _
    ByVal dwFileAttributes As Long, _
    psfi As SHFILEINFO, _
    ByVal cbSizeFileInfo As Long, _
    ByVal uFlags As Long) _
    As Long
        
Private Declare Function apiDestroyIcon Lib "user32" _
   Alias "DestroyIcon" _
   (ByVal hIcon As Long) _
   As Long
#End If

Private psfi As SHFILEINFO

Private Const SW_HIDE = 0
Private Const SW_SHOWNORMAL = 1
Private Const SW_SHOWMINIMIZED = 2
Private Const SW_SHOWMAXIMIZED = 3

#If VBA7 Then
Private Declare PtrSafe Function apiShowWindow Lib "user32" _
   Alias "ShowWindow" _
   (ByVal hwnd As LongPtr, _
   ByVal nCmdShow As LongPtr) _
   As LongPtr
#Else
Private Declare Function apiShowWindow Lib "user32" _
   Alias "ShowWindow" _
   (ByVal hWnd As Long, _
   ByVal nCmdShow As Long) _
   As Long
#End If

Private Sub ShellTrayAdd()
   
   Dim nID As NOTIFYICONDATA
   
   If NOTIFYICONDATA_SIZE = 0 Then SetShellVersion
   
   With nID
   
      .cbSize = NOTIFYICONDATA_SIZE
      .hwnd = Application.hWndAccessApp
      
      .uID = APP_SYSTRAY_ID
      .uFlags = NIF_MESSAGE Or NIF_ICON Or NIF_TIP
      .dwState = NIS_SHAREDICON
      .hIcon = fSetIcon(GetAppIcon)
      
      .szTip = "DHLGM Message Service" & vbNullChar
      .uTimeoutAndVersion = NOTIFYICON_VERSION
      
   End With
   
   Call Shell_NotifyIcon(NIM_ADD, nID)
   
   Call Shell_NotifyIcon(NIM_SETVERSION, nID)
       
End Sub

Private Sub ShellTrayRemove()

   Dim nID As NOTIFYICONDATA
   
   If NOTIFYICONDATA_SIZE = 0 Then SetShellVersion
      
   With nID
      .cbSize = NOTIFYICONDATA_SIZE
      .hwnd = Application.hWndAccessApp
      .uID = APP_SYSTRAY_ID
   End With
   
   Call Shell_NotifyIcon(NIM_DELETE, nID)
   Call apiDestroyIcon(nID.hIcon)
End Sub

Private Sub ShellTrayModifyTip(nIconIndex As Long)

   Dim nID As NOTIFYICONDATA

   If NOTIFYICONDATA_SIZE = 0 Then SetShellVersion
   
   With nID
      .cbSize = NOTIFYICONDATA_SIZE
      .hwnd = Application.hWndAccessApp
      .uID = APP_SYSTRAY_ID
      .uFlags = NIF_INFO
      .dwInfoFlags = nIconIndex
      
      .szInfoTitle = mstrHeading & vbNullChar
      .szInfo = mstrMessage & vbNullChar
   End With

   Call Shell_NotifyIcon(NIM_MODIFY, nID)

End Sub

Private Sub SetShellVersion()

   Select Case True
      Case IsShellVersion(6)
         NOTIFYICONDATA_SIZE = NOTIFYICONDATA_V3_SIZE
      
      Case IsShellVersion(5)
         NOTIFYICONDATA_SIZE = NOTIFYICONDATA_V2_SIZE
      
      Case Else
         NOTIFYICONDATA_SIZE = NOTIFYICONDATA_V1_SIZE
   End Select

End Sub

Private Function IsShellVersion(ByVal version As LongPtr) As Boolean

   Dim nBufferSize As Long
   Dim nUnused As Long
   Dim lpBuffer As LongPtr
   Dim nVerMajor As Integer
   Dim bBuffer() As Byte
   
   Const sDLLFile As String = "shell32.dll"
   
   nBufferSize = GetFileVersionInfoSize(sDLLFile, nUnused)
   
   If nBufferSize > 0 Then
    
      ReDim bBuffer(nBufferSize - 1) As Byte
    
      Call GetFileVersionInfo(sDLLFile, 0&, nBufferSize, bBuffer(0))
    
      If VerQueryValue(bBuffer(0), "\", lpBuffer, nUnused) = 1 Then
         
         CopyMemory nVerMajor, ByVal lpBuffer + 10, 2
        
         IsShellVersion = nVerMajor >= version
      
      End If
    
   End If
  
End Function

Private Function GetSelectedOptionIndex() As LongPtr

    GetSelectedOptionIndex = 2
                            
End Function

Public Property Get Icon() As btIcon
    Icon = mlngIcon
End Property

Public Property Let Icon(ByVal lngIcon As btIcon)
    mlngIcon = lngIcon
End Property

Public Property Get Heading() As String
    Heading = mstrHeading
End Property

Public Property Let Heading(ByVal strHeading As String)
    mstrHeading = strHeading
End Property

Public Property Get Message() As String
    Message = mstrMessage
End Property

Public Property Let Message(ByVal strMessage As String)
    mstrMessage = strMessage
End Property

Public Sub Show()
       Call ShellTrayAdd
       ShellTrayModifyTip mlngIcon
End Sub

Public Sub Hide()
   ShellTrayRemove
End Sub

Private Function fSetIcon(strIconPath As String) As Long
Dim hIcon As Long
   hIcon = apiLoadImage(0&, strIconPath, IMAGE_ICON, 16&, 16&, LR_LOADFROMFILE)
   If hIcon Then
      fSetIcon = hIcon
   End If
End Function

Public Function GetAppIcon() As String
    Dim dbs As DAO.Database, prp As Property
    Const conPropNotFoundError = 3270
    On Error GoTo GetAppIcon_Error
   
    Beep
    Set dbs = CurrentDb
    GetAppIcon = dbs.Properties("AppIcon")

ExitHere:
   Exit Function

GetAppIcon_Error:

    Select Case Err.Number
    Case 3270 'PropertyC Not Found
        'db doesn't have an associated icon - no message needed
       ' MsgBox "Current Database needs to have a custom icon", vbCritical, "No Icon Found"
        Resume ExitHere
    Case Else
        MsgBox "An Unexpected Error has occured please inform IT Support Error " & Err.Number & " " & Err.Description & " in procedure GetAppIcon of Class Module BalloonTooltip", vbCritical, "db2"
        Resume ExitHere
    End Select
    'Debug Only
    Resume

End Function
Regards,
Margarit
riti90 is offline   Reply With Quote
Old 05-23-2018, 04:10 PM   #5
ridders
Newbee moderator
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 5,536
Thanks: 79
Thanked 1,373 Times in 1,282 Posts
ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough
Re: Create system tray alerts in Access

Attached is an updated version of this utility which. I'm pleased to say, now also works in 64-bit Access.

The only change is to the class module BalloonTooltip

Many thanks to riti90 for doing the majority of the conversion to 64-bit code
Attached Files
File Type: zip SystemTrayAlert_v1.5.zip (152.1 KB, 70 views)
__________________
Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left and leave a comment.

New example databases:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


-------------------------
nil illegitimi carborundum est
ridders is offline   Reply With Quote
The Following User Says Thank You to ridders For This Useful Post:
Juleehz (05-28-2018)
Old 05-28-2018, 04:36 AM   #6
Juleehz
Newly Registered User
 
Join Date: May 2018
Posts: 3
Thanks: 3
Thanked 0 Times in 0 Posts
Juleehz is on a distinguished road
Re: Create system tray alerts in Access

Quote:
Originally Posted by ridders View Post
Attached is an updated version of this utility which. I'm pleased to say, now also works in 64-bit Access.

The only change is to the class module BalloonTooltip

Many thanks to riti90 for doing the majority of the conversion to 64-bit code
Hello Brother, is there any way to get it by PM? cause i need that 64-bit Modulo :c ty !
Juleehz is offline   Reply With Quote
Old 06-09-2018, 12:29 PM   #7
ridders
Newbee moderator
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 5,536
Thanks: 79
Thanked 1,373 Times in 1,282 Posts
ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough
Re: Create system tray alerts in Access

The following posts have all just been approved
#2 - lelo28 (I've removed 2 duplicate posts)
#3 - el-alcaide
#4 - riti90
#6 - juleehz


@lelo28
Post #1 clearly stated it didn't work in 64-bit Access. That was fixed in post #5 with the assistance of riti90

@el-alcaide
The appearance of the alert is determined by Windows and is different in Win7 to that in Win10. No idea what its like in Win8 as i never used it.
I don't know of any way of modifying the colours
Similarly it seems that the alerts cannot be made interactive using VBA...though I would be very happy if anyone can work out how to do so

riti90
Once again thanks for your help. Changes included in post #5

juleehz
Just download it from post #5

__________________
Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left and leave a comment.

New example databases:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


-------------------------
nil illegitimi carborundum est

Last edited by ridders; 06-10-2018 at 09:00 AM.
ridders is offline   Reply With Quote
The Following User Says Thank You to ridders For This Useful Post:
riti90 (06-11-2018)
Old 06-10-2018, 11:09 AM   #8
Juleehz
Newly Registered User
 
Join Date: May 2018
Posts: 3
Thanks: 3
Thanked 0 Times in 0 Posts
Juleehz is on a distinguished road
Re: Create system tray alerts in Access

on 5# post...

Attachments Pending Approval SystemTrayAlert_v1.5.zip
Juleehz is offline   Reply With Quote
Old 06-11-2018, 12:47 AM   #9
ridders
Newbee moderator
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 5,536
Thanks: 79
Thanked 1,373 Times in 1,282 Posts
ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough
Re: Create system tray alerts in Access

Apologies. Approved now & posting to trigger email notifications
__________________
Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left and leave a comment.

New example databases:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


-------------------------
nil illegitimi carborundum est
ridders is offline   Reply With Quote
The Following User Says Thank You to ridders For This Useful Post:
riti90 (06-11-2018)
Old 06-21-2018, 05:45 AM   #10
el.alcalde
Newly Registered User
 
Join Date: Apr 2018
Location: GermanY
Posts: 13
Thanks: 2
Thanked 0 Times in 0 Posts
el.alcalde is on a distinguished road
Re: Create system tray alerts in Access

Ridders, thanks a lot for your example and including the 64-bit version.
Have a nice day.
el.alcalde is offline   Reply With Quote
Old 07-12-2018, 07:23 AM   #11
psyc0tic1
Access Moron
 
Join Date: Jul 2017
Posts: 148
Thanks: 74
Thanked 1 Time in 1 Post
psyc0tic1 is on a distinguished road
Re: Create system tray alerts in Access

Just something I noticed...

The "Support Expiry Date" field.... if you change it via the date picker it does display the date you choose in the field but does not generate the new system tray message.

If you manually change the date in the field and then click on the form outside the field it will popup the new system tray alert with the changed date.

I also noticed there was no system tray icon below the message.

I don't know if that is how it is supposed to act.
__________________
Richard
Access 2013, Windows 7 64 bit

Last edited by psyc0tic1; 07-12-2018 at 08:48 AM.
psyc0tic1 is offline   Reply With Quote
Old 07-12-2018, 08:12 AM   #12
ridders
Newbee moderator
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 5,536
Thanks: 79
Thanked 1,373 Times in 1,282 Posts
ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough
Re: Create system tray alerts in Access

Thanks for your message
I can confirm its no longer working for me either - tested in Windows 10 v1709 (but one which had v1803 installed and then removed)

I've also tried my Attention Seeking database in sample databases which includes the same feature AND two other similar utilities written by others.

In each case, all I see is a brief flash as an icon is added to the notifications area but no alert message

So either a Windows update or Access update must have broken the feature in the last month.

I'll post to a standard forum area to try & get feedback from others before looking into the cause
__________________
Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left and leave a comment.

New example databases:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


-------------------------
nil illegitimi carborundum est
ridders is offline   Reply With Quote
Old 07-12-2018, 09:29 AM   #13
Gasman
Access newbie
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 2,056
Thanks: 261
Thanked 307 Times in 292 Posts
Gasman will become famous soon enough Gasman will become famous soon enough
Re: Create system tray alerts in Access

Colin,
I know I am only on 2007, but I found an End Type missing in BalloonToolTip for Private Type NOTIFYICONDATA when I downloaded from link in post #5?
__________________
Access novice. Sometimes trying to give something back.
Access 2007
Gasman is online now   Reply With Quote
Old 07-12-2018, 04:32 PM   #14
ridders
Newbee moderator
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 5,536
Thanks: 79
Thanked 1,373 Times in 1,282 Posts
ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough
Re: Create system tray alerts in Access

Well spotted Gasman
I've added the missing line in the class module declarations
Version 1.6 attached - no other changes made

Can you let me know if this is now working for you

However it hasn't fixed the issue for me (tested on 2 PCs) and I haven't got time to look into it for a while.
I believe the problem is caused by a recent Office update as it (and other similar examples) worked a month ago
Attached Files
File Type: zip SystemTrayAlert_v1.6.zip (184.0 KB, 19 views)
__________________
Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left and leave a comment.

New example databases:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


-------------------------
nil illegitimi carborundum est
ridders is offline   Reply With Quote
Old 07-12-2018, 11:54 PM   #15
Gasman
Access newbie
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 2,056
Thanks: 261
Thanked 307 Times in 292 Posts
Gasman will become famous soon enough Gasman will become famous soon enough
Re: Create system tray alerts in Access

V1.6
On my laptop in work.
It now starts up OK and if I use Check Website I get told a later version is available.
However if I try the date picker I get error in frmDatePicker - DrawDateButtons of 'Compile Error - Method or data member not found' on
Code:
btn.BackColor = ColLemon
I have no missing references.

However not sure I tested this previously?

__________________
Access novice. Sometimes trying to give something back.
Access 2007
Gasman is online now   Reply With Quote
Reply

Tags
balloon tooltips , system notifications

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Access minimized to system tray Novice1 Forms 3 04-27-2018 01:24 AM
System Tray Icon a_20120 Modules & VBA 5 11-28-2013 10:49 AM
Can I disappear my DB to the system tray...? Please? Randomblink Modules & VBA 17 06-30-2006 07:39 AM
minimize to system tray razaqad General 1 03-13-2006 11:18 AM
[SOLVED] Minimize to System Tray syri Modules & VBA 1 10-28-2005 04:49 AM




All times are GMT -8. The time now is 09:08 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World