changing directory

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have a form with a button that runs the following code to insert a
hyperlink into a field.

DoCmd.GoToControl "frmAttachSubform"
DoCmd.GoToControl "Attachments"
DoCmd.GoToRecord , "", acNewRec
DoCmd.RunCommand acCmdInsertHyperlink


What I’m having a problem with is that all the documents that we store and
want a hyperlink to are stored on a network drive, the data base is a front
end MDE file on the local machines. I need to be able to default to the
network drive and directory when someone goes to add a new record and not
have them have to navigate to the correct drive.

As always thanks in advance for any help with this.

Chuck
 
Try setting the Default Database Directory property to the network share -
from the menu, Tools | Options | General tab | Default Database Directory.
You can also probably set this in code on your app open.
 
I have tried changing the Default Database Directory but that dosen't work.
the code fir open app I don't know.
 
Try this in the Open event of your app's startup form:

SetOption "Default Database Directory", "\\server_name\share_name"

replacing the "server_name" and "share_name" with the appropriate values.
 
Back
Top