I made an Access 2013 program which uses MS Azure for the SQL backend.
Before a report (or other functions) is executed the code was checking to make sure there was a connection to the internet by using InternetGetConnectedState(
0&, 0&). I thought this was a good solution but discovered that this code only works if you unplug the Ethernet cable from your computer or disable the wireless in the "Network Connections."
In other words when the internet went down the above code would give a false positive that there was still internet connectivity because I was still connected to my router. And with no internet access the report locks up because it can't communicate with Azure.
So I need VBA code to check in the background if the internet is available, maybe a simple ping to www.msn.com
. If "true" then I can let the report execute, if "false" then a msgbox would tell the user that the internet is down.