Thanks. After writing my original note, I was search some more and came
across a response written by the VB genius Douglas Steele. His response
pointed me to that website also. The code on the website needs quite a bit
of tweaking to work because it is not written for use in Access. Field names
are referred to differently in Access, you need to be careful on the order
of the code posted to the form and you need to have some "know-how" on
creating a form and matching the VB field names with the form field names.
Bottom line: I used the code, did the tweaking and it works. This will help
a lot.
Thanks.
"Daniel Pineault" wrote:
> You could use the code found at
>
> http://vbnet.mvps.org/index.html?cod...tworkalive.htm
>
> to test your network connection. Did it for me instantaneously!
>
> Another alternative is to perform a dir() check of a known path on the
> network, but then you still have a time out wait, but it isn;t normally 30
> seconds. I still think option 1 is a better approach though.
> --
> Hope this helps,
>
> Daniel Pineault
> http://www.cardaconsultants.com/
> For Access Tips and Examples: http://www.devhut.net
> Please rate this post using the vote buttons if it was helpful.
>
>
>
> "Anthony" wrote:
>
> > Thanks. I don't know if mapped drives it what I want. I want to know if I
> > am connected to the LAN/WAN regardless of whether I have any mapped network
> > drives.
> >
> > "Dale Fye" wrote:
> >
> > > There is an API call that will return a list of the mapped drives, with their
> > > UNC designation. See the code at:
> > >
> > > http://www.mvps.org/access/api/api0003.htm
> > > --
> > > HTH
> > > Dale
> > >
> > > email address is invalid
> > > Please reply to newsgroup only.
> > >
> > >
> > >
> > > "Anthony" wrote:
> > >
> > > > I have a database where the tables are on a remote MS SQL server. I have to
> > > > connect to the server when I start the DB. Is there a command in VB you can
> > > > use the will check some Microsoft O/S flag to tell you if you are connected
> > > > to a network?Right now what I am doing is trying to connect to the network,
> > > > if it tries for 30 seconds and can't connect, it gives me an error # that I
> > > > use to tell if I am connected to the network. It would be nice if there was
> > > > a O/S flag that was set/not set when you are not connected to a network,
> > > > without having to first try to connect to the network. That way, you can
> > > > save 30 seconds trying to connect.
> > > >
> > > > Thanks