M
Mike Revis
Hi Group,
Access 2000. Win xp pro.
In my efforts to find a way to open a file in Access I found the following
code.
Private Sub cmdViewTechSheet_Click()
'Open the Tech Sheet file.
Dim stAppName As String
Dim FilePath As String
FilePath = Me!FilePath
stAppName = "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe " &
FilePath
Call Shell(stAppName, 1)
End Sub
FilePath is a text field on my form in which the file path has been entered
in the form \\ServerName\ShareName\FileName.pdf.
This works well as long as the file path has been entered correctly.
There is another field on the form called ProductCode that has the product
code which also happens to be the file name that I want to open.
What I would like to accomplish is to have the "FilePath" pull the product
code from the ProductCode field.
Something along the lines of FilePath = \\ServerName\ShareName\ &
[ProductCode] & ".pdf"
As always any thoughts, comments or suggestions are welcome.
Mike
Access 2000. Win xp pro.
In my efforts to find a way to open a file in Access I found the following
code.
Private Sub cmdViewTechSheet_Click()
'Open the Tech Sheet file.
Dim stAppName As String
Dim FilePath As String
FilePath = Me!FilePath
stAppName = "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe " &
FilePath
Call Shell(stAppName, 1)
End Sub
FilePath is a text field on my form in which the file path has been entered
in the form \\ServerName\ShareName\FileName.pdf.
This works well as long as the file path has been entered correctly.
There is another field on the form called ProductCode that has the product
code which also happens to be the file name that I want to open.
What I would like to accomplish is to have the "FilePath" pull the product
code from the ProductCode field.
Something along the lines of FilePath = \\ServerName\ShareName\ &
[ProductCode] & ".pdf"
As always any thoughts, comments or suggestions are welcome.
Mike