Mapping a shared drive On open of a form

gbanks

Registered User.
Local time
Today, 23:17
Joined
Feb 9, 2000
Messages
161
Is there a way to map a network drive on the On Open event (or some other event) when a form is open. The drive mapping is \\sever1\FS_ADM_Data_06$. Really in a bind here. Thanks..
 
Can't you map the drive normally with auto- reconnect at logon. Then do a shortcut on the desktop to the Db?

Col
:cool:
 
I can't remember where I got this code but I believe it was one of those VB Snippet sites. But I have attached the code behind a module I use to map/unmap drives using UNC paths. The method ConnectUNC will not only map the drive but it returns the drive letter it created so you can know what drive letter to reference.

The code will also locate an available drive letter to use so that you don't have to "tell" it what letter to use. It starts with Z and works backwards until it finds an available drive letter.
 

Attachments

Users who are viewing this thread

Back
Top Bottom