Hi, I was not sure which NG to put this post but I thought anyone
could help here.
I have a different FEs on 3 client computers and one BE on a small
LAN.
I was wondering if someone would kindly supply me a code or function
that runs when the network connection between the FE and BE drops and
automatically closes the FE application after displaying a friendly
warning saying that there is no network connectivity and the FE will
shut down.
I am a newbie on the the whole VBA and API programming so anyone out
there who can solve this mystery of mine will be superb.
Thanks,
niuginikiwi
Allen Browne - 30 Mar 2007 03:13 GMT
Here's a starting point:
http://support.microsoft.com/?id=128814

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
> Hi, I was not sure which NG to put this post but I thought anyone
> could help here.
[quoted text clipped - 9 lines]
> Thanks,
> niuginikiwi
Albert D. Kallal - 30 Mar 2007 03:35 GMT
Actually, I don't think there is a easy way to do this.
If you experience a break in your network connection, you going to wind up
with corrupted (damaged data).
You can not in any way consider running a system in which network
disconnections will occur.
Your start-up code can simply try to open a table, and if it fails..then you
don't have a connection.
However, detecting a connection DURING the running of the application is not
really possible, nor recommended.
Read CAREFULLY the following document and the part about why a data base
will corrupt:
http://www.members.shaw.ca/AlbertKallal/Wan/Wans.html
If you experaince a break in the conenciton, then you will have data that
does make it back to the file.
You need to elimonate the reason for the break in the conenction, not write
code to test for the occurnace of the break.
As mentieond, you will certanly have startup code that tests if you can open
up the back end database (you open a table...and error trap that).
This is really why you also can't run ms-access over a wireless network...

Signature
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@msn.com
Tony Toews [MVP] - 31 Mar 2007 02:31 GMT
>I was wondering if someone would kindly supply me a code or function
>that runs when the network connection between the FE and BE drops and
>automatically closes the FE application after displaying a friendly
>warning saying that there is no network connectivity and the FE will
>shut down.
From what I've seen "Disk or Network Error" which is the message when
the network connection is broken, are handled internally to Access and
the form VBA code error handling isn't even run. At least not for
the first few messages.
However what greatly concerns me is why you are getting these kinds of
messages. You shouldn't be having such problems.
Tony

Signature
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm