Re: How to quick-check SQL connection



Try this:

If Application.CurrentProject.IsConnected Then...

I'm not sure it works with .mdb but it works fine with .adp and it's
wort to give it a try.

ZRexRider wrote:

> I'm developing an application that runs on laptops that periodically
> connect to network. I am collecting data in local tables within the
> MDB. I want to recognize the occasional network connection so I can
> upload the collected data to SQL server and retrieve updated look-up
> information.
> ...
> Dim conn As ADODB.Connection
> Set conn = New ADODB.Connection
> With conn
> .ConnectionString = CurrentProject.BaseConnectionString
> .CursorLocation = adUseClient
> .CommandTimeout = 10 ' shorten delay to 10 seconds
> .Open
> End With

.