Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / February 2005

Tip: Looking for answers? Try searching our database.

Open Folder on Network via Command Button

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Robert - 18 Feb 2005 16:59 GMT
I have a form which displays a single record with a single field [SKU] at a
time.  On this form, I have a command button, which on a click, I would like
for it to open a folder on our company's network.  For example, if [SKU] =
C100 on the current record, I would like to build some code so that if a
person pushes the command button, windows will automatically open the folder
Z:\XXXX\XXX\XXX\C100 and display its contents.  Please help!
Tim Ferguson - 18 Feb 2005 18:11 GMT
> For example, if [SKU] =
> C100 on the current record, I would like to build some code so that if
> a person pushes the command button, windows will automatically open
> the folder Z:\XXXX\XXX\XXX\C100 and display its contents.  Please
> help!

 ' get the full path, remember the \ at the end
 ' if you need to make this OS independent, use the
 ' Application.PathSeparator inbuilt
 '
 strPath = "z:\XXX\XXX\XXX\" & me!SKU & "\"

 ' now call the Windows Explorer; don't forget the space in the
 ' middle!
 Shell "explorer.exe " & strPath

Hope that helps

Tim F
Robert - 18 Feb 2005 19:13 GMT
Thanks, Tim.  It worked beautifully!

> > For example, if [SKU] =
> > C100 on the current record, I would like to build some code so that if
[quoted text clipped - 15 lines]
>
> Tim F
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.