Auto Close FE When No Network Connection

  • Thread starter Thread starter niuginikiwi
  • Start date Start date
N

niuginikiwi

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
 
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...
 
niuginikiwi said:
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
--
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
 
Back
Top