Hi,
I need to open from a form a specific folder where will match only the first 3 letters.
Example:
On the form I have a field named [CompanyName] and in this example [CompanyName]="ABC Customer"
On the server, the folder name for this Customer is only ABC (without Customer)
To open this folder I tried this, but doesn't work:
strFoldername = Left(Me.CompanyName, 3)
If Dir("\\datasrv\serverdata\Customer's Documents\PO\" & strFoldername, vbDirectory) = "" Then
MsgBox "Missing folder with this Company name"
Else
FollowHyperlink "\\datasrv\serverdata\Customer's Documents\PO\" & strFoldername & "*"
End If
Can you help please?
Thanks
I need to open from a form a specific folder where will match only the first 3 letters.
Example:
On the form I have a field named [CompanyName] and in this example [CompanyName]="ABC Customer"
On the server, the folder name for this Customer is only ABC (without Customer)
To open this folder I tried this, but doesn't work:
strFoldername = Left(Me.CompanyName, 3)
If Dir("\\datasrv\serverdata\Customer's Documents\PO\" & strFoldername, vbDirectory) = "" Then
MsgBox "Missing folder with this Company name"
Else
FollowHyperlink "\\datasrv\serverdata\Customer's Documents\PO\" & strFoldername & "*"
End If
Can you help please?
Thanks