I am trying to open Word documents when a button is pushed. The documents are located on a certain server in a specific master forms directory. Presumably, the documents are located in certain subdirectories based on their usage (or placement by the user). The message box in the following code shows the correct location of the document but when I try to run the followhyperlink procedure I get a run-time error. Any idea what I'm doing wrong or need to change to get this working is greatly appreciated.
Private Sub Command4615_Click()
'Set variables for lan directories relating to form field entries
Dim strMainDir As String 'Main directory
Dim strTerrID As String 'Subdirectory of Main directory
Dim strFormType As String ' Subdirectory of TerrID directory
Dim strFormID As String 'Subdirectory of FormType directory
strMainDir = "http://MFXDOCCDD01/Development/Business_Teams/Product_Development/TRIWAY FORMS/"
strTerrID = Me.TerrID
strFormType = Me.Form_Type
strFormID = Me.Form_nm & " " & Me.Form_vdt
'Open form
'MsgBox strMainDir & strTerrID & "/" & strFormType & "/" & strFormID & ".doc"
FollowHyperlink strMainDir & strTerrID & "/" & strFormType & "/" & strFormID & ".doc", , True
End Sub
Private Sub Command4615_Click()
'Set variables for lan directories relating to form field entries
Dim strMainDir As String 'Main directory
Dim strTerrID As String 'Subdirectory of Main directory
Dim strFormType As String ' Subdirectory of TerrID directory
Dim strFormID As String 'Subdirectory of FormType directory
strMainDir = "http://MFXDOCCDD01/Development/Business_Teams/Product_Development/TRIWAY FORMS/"
strTerrID = Me.TerrID
strFormType = Me.Form_Type
strFormID = Me.Form_nm & " " & Me.Form_vdt
'Open form
'MsgBox strMainDir & strTerrID & "/" & strFormType & "/" & strFormID & ".doc"
FollowHyperlink strMainDir & strTerrID & "/" & strFormType & "/" & strFormID & ".doc", , True
End Sub