changing directory

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
 
R

Ron Hinds

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.
 
G

Guest

I have tried changing the Default Database Directory but that dosen't work.
the code fir open app I don't know.
 
R

Ron Hinds

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.
 

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