Kamis, 12 Juni 2014

RE: [MS_AccessPros] Link

 

Graham,

Thanks for the info.  I received a few responses and read them all over.  This one worked first.

 

I should have been more clear, I want to open a folder, actually a sub folder.   I now have a button on my form that open a folder, which is my main folder.   Below is the code.  There is just one line of code.

 

Application.FollowHyperlink \\ARMOR\Business\Groups

 

However, within the “Groups” folder there are other folders.  The folder I want to go to is the folder that is named the same as the name in my combo box called  “OrganizationName”.

 

For example if I was on the record for Hayfield and the combo box said Hayfield the link would go to

 

Application.FollowHyperlink \\ARMOR\Business\Groups\Hayfield

 

 

I am guessing I would have to do something like

 

 

Private Sub Command19_Click()

Dim strName as string

strName= txt.OrganizationName

Application.FollowHyperlink \\ARMOR\Business\Groups\strName

 

End Sub

 

 

 

Am I anywhere close.   I will try to mess with this a bit if I can.

 

Bill

MN

 

 

From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com]
Sent: Wednesday, June 11, 2014 5:02 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: RE: [MS_AccessPros] Link

 

 

Hello Bill

You can use FollowHyperlink to open a folder in Windows File Explorer – for example:

FollowHyperlink "C:\Windows"
FollowHyperlink "
\\server\myshare\My Folder"
FollowHyperlink CurrentProject.Path
FollowHyperlink Me.SomeControlName

The last of these shows how the destination can change with different records.  Or, of course, your code could “construct” the destination folder from values in the current record – perhaps by removing the file name from a full path.

All the best,
Graham


 

 

I am wondering if it is possible to make a button on one of my forms browse to a certain location on my network or on my computer.   I keep going back and forth and it would sure be nice to have quicker access. 

 

The next question is… is it possible for that button to go to different files on the network based on the Access record that I am on?

 

Thanks for your help.

 

Bill

MN

 

__._,_.___

Posted by: "Bill Singer" <Bill.Singer@at-group.net>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (5)

.

__,_._,___

Tidak ada komentar:

Posting Komentar