Hyperlink

S

steve goodrich

Is it possible to create a command button on a form that will open a folder
on the network?
I can create a hyperlink to a file but not to a folder,
any help would be appreciated
Steve
 
R

Rick Brandt

steve said:
Is it possible to create a command button on a form that will open a
folder on the network?
I can create a hyperlink to a file but not to a folder,
any help would be appreciated
Steve

Application.FollowHyperlink "path to folder"

works for me.
 
S

steve goodrich

if I type the path to the folder I get an error message "File not found"
A path to a file works fine.
Where am I going wrong?
I use the toolbox, click the command button with the wizard enabled. Select
application > run application and type in the path.
If you click the browse button and navigate to a folder, you have to select
a file

Steve
 
B

boblarson

Steve:

Have you tried it this way using the right syntax:

FollowHyperlink "file:///C:\YourFolderNameHere"
--
Bob Larson
Access World Forums Super Moderator
Utter Access VIP
Tutorials at http://www.btabdevelopment.com
If my post was helpful to you, please rate the post.
__________________________________
 
S

steve goodrich

Tried you suggestion Bob but still got the same "File not found" error
message
Steve
 
J

John Spencer

Just a confirmation:

I just tested the following

FollowHyperlink "C:\Program Files"

and it worked for me.

Access 2003 Service Pack 1
Windows XP Pro Service Pack 2

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
B

boblarson

It's working for me, just like Rick and John. Can you post the exact code
you're using and which event are you putting it on? Are you sure you put it
in the VBA code window and not in the properties dialog (see here for info on
that:
http://www.btabdevelopment.com/main/QuickTutorials/Wheretoputcodeforevents/tabid/56/Default.aspx )?
--
Bob Larson
Access World Forums Super Moderator
Utter Access VIP
Tutorials at http://www.btabdevelopment.com
If my post was helpful to you, please rate the post.
__________________________________
 
S

steve goodrich

Success. I was using the toolbox command button wizard.
I created my button without the wizard, clicked build event and typed my
path in and it worked fine. Thanks guys
Steve
 

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