Tom Crowfoot
asked on
Open Folder using explorer
Hi Experts
I am running access 2003 and have a form which I want to add a command button to that opens up a folder (using explorer).
The file path for the folder will change from record to record. But as part of the set up process for each record, a folder is created in the following filepath U:\CDG\CDG\Members Folders\ & then has a sub folder derived using the following naming protocol [First Name]-[Last Name]-[ID] (i.e. Dave-Smith-123)
So the link piece to the code would be U:\CDG\CDG\Members Folders\[First Name] & "-" &[Last Name]& "-" & [ID]
Has anyone got a piece of code to do this or can anyone help?
I am running access 2003 and have a form which I want to add a command button to that opens up a folder (using explorer).
The file path for the folder will change from record to record. But as part of the set up process for each record, a folder is created in the following filepath U:\CDG\CDG\Members Folders\ & then has a sub folder derived using the following naming protocol [First Name]-[Last Name]-[ID] (i.e. Dave-Smith-123)
So the link piece to the code would be U:\CDG\CDG\Members Folders\[First Name] & "-" &[Last Name]& "-" & [ID]
Has anyone got a piece of code to do this or can anyone help?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Here is the generic Shell:
Shell "explorer.exe U:\CDG\CDG\Members Folders\", vbNormalFocus
mx
Shell "explorer.exe U:\CDG\CDG\Members Folders\", vbNormalFocus
mx
ASKER
Perfect thank you,
Application.FollowHyperlin
The rest can be achieved by cycling through or looking at a recordset to gather and concatenate the first/last name and IDs to create the entire folder location (assuming this is available in a table or query).
Hope that helps,
Sean