Common address in hyperlink on shared drive

Rob4077
Rob4077 used Ask the Experts™
on
I have set up a form that has a button to allow users to attach a link to a photo. The code for the button is:
CarPicture1.SetFocus
DoCmd.RunCommand acCmdInsertHyperlink

It works well for the machine that contains the picture. I have now set the drive that the photos and the backend database reside on as a shared drive. I then loaded the Front end on another PC. The program works fine but when I double-click on a photo from the remote machine it won't open, presumably because the reference is to a place on a local drive. Does anyone have any suggestions on how to set it up so that the reference works irrespective of what machine it is loaded on?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Rob,

Take a look on this link: http://www.access-programmers.co.uk/forums/showthread.php?t=58910

This might help.

Sincerely,
Ed
By the way, does CarPicture1 the field where the hyperlink displays after you run the acCmdInsertHyperlink?

Ed

Top Expert 2011

Commented:
"I have now set the drive that the photos and the backend database reside on as a shared drive"

- since you already put the database and picture on  shared drive, you can try 2 option:
1: mapped that shared drive on all pc that need to access that shared drive. use a same mapped drive name for  all such as H:\. make sure you clicked the checkbox on 'always reconnect..' and 'remember password' option if available. in your program, use H:\ as the folder to read the database and picture.

2: use //machinenameORipaddress/sharedfolder/ in your code to refer to the shared drive.

- make sure all the pc have the right previllege and access to that shared drive.

Author

Commented:
Sorry for the delay in responding. I thought I had closed out but forgot. i ended up using the suggestion made by Mindsuperb as it seemed to work well and easily.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial