golferbabe38
Registered User.
- Local time
- Today, 10:39
- Joined
- Sep 17, 2007
- Messages
- 19
Hey everyone 
Need some help with my first shell command. I'm close, but no cigar.
I have a form in access and have inserted a command button labeled "Folder". I would like the users to be able to click this Folder button and have the corresponding file open from a folder on the server. The file name will be the same as the data entered in the PatientName field in the form.
Example: Data in the Patient Name field: Doe, John
File housed in folder on the server: Doe, John
Thus far, I am able to open the explorer window, but it opens to My Documents instead of the Foldername path I have below. Any help would be appreciated. Thanks!
Sub Folder_Click()
Dim Foldername As String
Foldername = "V:\EMA Shared\Legal\Records Requests\" & PatientName.Value
Shell "C:\WINDOWS\explorer.exe """ & Foldername & "", vbNormalFocus
End Sub
Need some help with my first shell command. I'm close, but no cigar.
I have a form in access and have inserted a command button labeled "Folder". I would like the users to be able to click this Folder button and have the corresponding file open from a folder on the server. The file name will be the same as the data entered in the PatientName field in the form.
Example: Data in the Patient Name field: Doe, John
File housed in folder on the server: Doe, John
Thus far, I am able to open the explorer window, but it opens to My Documents instead of the Foldername path I have below. Any help would be appreciated. Thanks!
Sub Folder_Click()
Dim Foldername As String
Foldername = "V:\EMA Shared\Legal\Records Requests\" & PatientName.Value
Shell "C:\WINDOWS\explorer.exe """ & Foldername & "", vbNormalFocus
End Sub