Error handling

B

Bernard

Access 2003
On a replicable data base, the front end, installed on laptops, requests the
user to synchronize with the design master with a yes/no button.
However, on remote locations, as long as the laptop is not connected to the
server and the “yes†button has been hit by error, how to program an error
handling, preventing the program to search for the server forever and ever?
Thanks in advance.
 
B

BeWyched

Hi
I'm sure that there are several ways of doing this but the way I have used
in a similar situation to yourself is to 'force' the front-end's to find a
known folder on the Server which will, of course, create an Error if the
Server is not connected. By capturing the Error you can then bypass the
synchronisation coding.

My coding looks like:

On Error GoTo Err_NotConnected
Set fs = CreateObject("Scripting.filesystemobject")
Set f = fs.getfolder("path_to_known_folder_on_server")
....... if f is Set then server must be connected so coding to synchronise
goes here......
Exit Sub
Err_NotConnected:
....... if f cannot be Set as server is not connected then coding if no
connection goes here
End Sub

Cheers.

BW
 
B

Bernard

Hi,
Well, thank you.
This was exactly what I was looking for.
Best regards and have a nice day.

Bernard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top