Opening a folder from a form

Keiath

Registered User.
Local time
Today, 22:23
Joined
Jan 6, 2012
Messages
104
I have a folder called site docs on our server

m:/estates/sitedocs

I want to have a button that opens this folder but in the correct site sub folder

Ie:- primary Key on form site number 0001S if i click site docs button i want it to open folder in estates.sitedocs/0001S or which ever site number form i am in for that site number

Hope that makes sense

how to do?
 
Hi Keiath,

Use the following:

Code:
Private Sub Command9_Click()
On Error GoTo Err_cmdExplore_Click

Dim stAppName As String

stAppName = "C:\Windows\explorer.exe C:\[COLOR=Red]My Documents\My eBooks[/COLOR]\" & Me.[COLOR=Red]CLIENT[/COLOR]
Call Shell(stAppName, 1)

Exit_cmdExplore_Click:
Exit Sub

Err_cmdExplore_Click:
MsgBox Err.Description
Resume Exit_cmdExplore_Click

End Sub

Just replace the text in red with your folder root and the name of the field (in my case I used the client name)

greetings,
megatronixs
 

Users who are viewing this thread

Back
Top Bottom