Log on to shared netword drive programmatically

K

Kwixster

I have an Access application that needs to access files on a network drive.
Every night the client turns off his computer and then back on in the
morning. When my Access app tries to find the file in the morning he gets
the error "Path/File access error" (error 75). To fix this he opens Windows
Explorer, selects "My Network Places" and the server name. Then he's asked
for his user name and password (which he enters). Now everything works fine.

Is there a way I can respond to this error by providing the user name and
password through VBA code?

Thanks in advance for any replies.
 
A

Alex Dybenko

try to use NET USE with shell()

type NET USE ? at command prompt for more info
 

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