Send message to specific user from Access Database

I have a database named AutoUpdate. The function is to pull data from a standalone database on a remote pc. If for some reason the routine to pull the data cannot run (network is down), I want the program to alert specific user(s) to the problem. I am trying to use msg.exe to accomplish this task. So far, I have not been able to do so. I have tried using Shell and pstools psexec to accomplish task.
Below is code I have tried so far.
The first code does not run because there is not a password.
The second code asks for a password. When password is entered, a second command prompt opens, code ends, no message.
The third line of code appears to work. However, I get two cmd windows. The first tells me than I am running "Execute Procedures remotely. The second is just blank.
    Dim strUser, strMessage As String
    Dim objShell As Object
    Set objShell = CreateObject("WScript.Shell")
    strUser = "wilbur.smith"
    strMessage = "Hello"
   'Check to see if the file is available
   If Dir("r:\!a\abc123.txt") <> "" Then
        'File not found
        'objShell.Run ("cmd /k c:\windows\system32\msg.exe * /server:" & strUser & " " & strMessage)
        'objShell.Run ("runas /user:domain\UserName ""C:\Windows\System32\cmd.exe /k C:\windows\system32\msg.exe * /server:" & strUser & " " & strMessage & """")
        'objShell.Run ("cmd /c c:\pstools\psexec -u domain\username -p Password cmd /c msg * /server:" & strUser & " " & strMessage)
    End If
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dale FyeOwner, Developing Solutions LLCCommented:
I use a 3rd party program called vbMapi to avoid the Outlook security messages.  If you want to continue to use Windows  tools for this, I would suggest you "request attention" and ask the moderator to add the appropriate Windows topic to your topic list.

ste5anSenior DeveloperCommented:
How should that work when the network is down? Then the message cannot arrive and the user thinks everything it's fine.

You need to post always a message. So that no message means: Oops. Network issues.
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPDesigner and DeveloperCommented:
If the network is down then  how can you send a message over the network?
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

rodneygrayAuthor Commented:
Sorry, I did not give you enough information. There are two remote pc's connected back to the office via wireless point to point. The database will be pulling information from the two remote pcs. Sometimes the remote pcs are down for some reason. Sometimes the wireless may have an issue. The rest of the network is fine.
Anyway, I came up with a workaround. I have semi-tested it and I think it will work.
From within Access,
Check to see if Station1Unavailable.txt, Station2Unavailable.txt exist
   Yes: Delete files
Check to see if the database can be seen (does it exist).
   Yes: If so, new data is uploaded.
   No: Create one or both: Station1Unavailable.txt, Station2Unavailable.txt

On the server
   Create a batch file which checks for existence of both of these files
   If one is found, batch file uses msg.exe to send message to specific users

Create task to run the batch file
  Schedule task to run every hour of every day
  Task uses credentials added when the task was created.

Not as elegant as I would like. Not very flexible. But, it will work.

If anyone has a better way, please let me know.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Dale FyeOwner, Developing Solutions LLCCommented:
strongly recommend against trying to use Access across a wireless network.  Access is very temperamental  with respect to the connection between the Front End and the Back End and wireless networks do not provide consistent, persistent connections.  You will inevitably have problems with lost connections and database corruption if you persist with this technique.
rodneygrayAuthor Commented:
Did not receive any other solutions and this one works.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.