Hello,
I hope this is a simple question that I can get some help with. I have a table full of individual ids and some associated information. For each individual is a .pdf file on my hard drive. I've created a form which displays some information about the individual id and on this form, i'd like to add a command button which when pressed, will open the .pdf file. I've created the command button and can get it to work where it opens up a hard coded .pdf, but don't know how to pass the associated indivdual ID as a parameter. can someone help me? I've included the code for the command button below. 0343766 is the id of the indivdual.
Private Sub Command15_Click()
Dim stAppName As String
Dim varFile As String
varFile = "X:\dir\desiredid\Database Files\\0343766.pdf"
stAppName = "C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe " & varFile
Call Shell(stAppName, 1)
End Sub
I hope this is a simple question that I can get some help with. I have a table full of individual ids and some associated information. For each individual is a .pdf file on my hard drive. I've created a form which displays some information about the individual id and on this form, i'd like to add a command button which when pressed, will open the .pdf file. I've created the command button and can get it to work where it opens up a hard coded .pdf, but don't know how to pass the associated indivdual ID as a parameter. can someone help me? I've included the code for the command button below. 0343766 is the id of the indivdual.
Private Sub Command15_Click()
Dim stAppName As String
Dim varFile As String
varFile = "X:\dir\desiredid\Database Files\\0343766.pdf"
stAppName = "C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe " & varFile
Call Shell(stAppName, 1)
End Sub