papa_k
09-03-2003, 08:57 AM
is it possible to pull off a file position (text string) from a sql server like
\\filestore\project1\testing
and place that into a form so that when the user clicks on it, it opens that folder?
Garmour
09-03-2003, 09:06 AM
You could show the file path in a label and use the _click event to call shellexecute on the path.
This will launch/open that folder in a standard Windows Explorer folder view.
Assuming, of course, that the user had access to the remote server path (ie, \\filestore)
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
private sub label1_click()
ShellExecute Me.hWnd, vbNullString, "c:\", vbNullString, "c:\", 1
end sub
will launch a view of c:\