I'm building a project management application (Access 2003). Each project has a folder on the network which serves as a hold-all for various documents. I want the Details Form for a given project to include a button that will open the relevant folder.
Application.FollowHyperlink "network\path" opens a folder -- behaves just the way I want it to. The problem is with providing the path. The folders are consistently placed on the network, but they are named somewhat arbitrarily, and it's not possible to deduce the full path.
The good news is, the first six characters of the target folder are fully consistant. It's stuff that follows that is arbitrary.
So what I am looking for essentially is:
strPathStart = "network path\goes for all projects\"
strPathFolder_6_digit = "Solid Start"
Search for folders whose path is like strPathStart & strProjectFolder_6_digit & Wildcard
If Count of such folders = 1 Then
strPathComplete = the search result
Application.FollowHyperlink strPathComplete
Else
MsgBox "Sorry, can't locate that folder!"
End If
I find API calls that will search across a network, using wildcards. The problem is they pull up all types of documents, and I am looking for a folder. msoFileType seemed to provide a way to restrict the search, but folder is not one of the types that it references.
Any ideas?
[purple]_______________________________
Never confuse movement with action -- E. Hemingway [/purple]
Application.FollowHyperlink "network\path" opens a folder -- behaves just the way I want it to. The problem is with providing the path. The folders are consistently placed on the network, but they are named somewhat arbitrarily, and it's not possible to deduce the full path.
The good news is, the first six characters of the target folder are fully consistant. It's stuff that follows that is arbitrary.
So what I am looking for essentially is:
strPathStart = "network path\goes for all projects\"
strPathFolder_6_digit = "Solid Start"
Search for folders whose path is like strPathStart & strProjectFolder_6_digit & Wildcard
If Count of such folders = 1 Then
strPathComplete = the search result
Application.FollowHyperlink strPathComplete
Else
MsgBox "Sorry, can't locate that folder!"
End If
I find API calls that will search across a network, using wildcards. The problem is they pull up all types of documents, and I am looking for a folder. msoFileType seemed to provide a way to restrict the search, but folder is not one of the types that it references.
Any ideas?
[purple]_______________________________
Never confuse movement with action -- E. Hemingway [/purple]