Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A Function to see if Network Drive is alive

Status
Not open for further replies.

zevw

MIS
Jul 3, 2001
697
US
I have PC's connected to the Network and when the users login locally on their PC into the Access Database they have to enter their username and password. In case they are not connected I want to let them know to connect to the network [I mean the network cable].

When I do a Dir("P:\") - [the network drive is P:] and they are not connected I get an error "device unavailable" I want to prompt them a message telling them they are not connected and quit the application. Is there a simple way to see if that Drive is available or not.

Your help is highly appreciated.
 
Not entirely sure, but you if you break the code at this error, & lookup the err.number you can then deduce what error is being triggered. You could then use a select case statement & provide a friendly error message if err.number = (the number which corresponds to the 'device unavailable' statement)






James Goodman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top