Full Version: Using a button to open 'My Music'
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
Paul75
Hi,

On a form, how do I make a button open the 'My Music' folder?

Cheers,
Paul.
jmcwk
Paul,

Welcome to UA Forums!

What type of folder is it? You can use the Command button wizard located in the Toolbox Toolbar. Click on a command button and drag it to a location on your form then go from there.
freakazeud
Hi,
welcome to UA forums.
If you want to hardcode the path then use:

Dim stAppName As String

stAppName = "C:\WINNT\explorer.exe c:\My Music"
Call Shell(stAppName, 1)

You can change the number at the end of the syntax to any of the one you want:
1 = open normal
2 = open minimized
3 = open maximized

Obviously you will need to change the directory of where your explorer.exe is located on Win2000 it is the above example!
If you want to dynamically retrieve the My Music folder of the user logged in then check this earlier discussion.
You might also find these helpful:
01
02
HTH
Good luck
Paul75
Thanks very much for that, has solved my problem.

Cheers.
Paul.
freakazeud
You're welcome.
Good luck on future projects!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.