ColinGrant
New member
- Local time
- Today, 07:09
- Joined
- Jun 13, 2011
- Messages
- 3
Hello,
I have a database full of part numbers, that have standard(Blueprints essentially) images that go with them. So, I want to have a button that allows the user to click and see the image of the part and all the details (Listed in a PDF). My code works perfect when I tell it to go to a specific page number. I've created a field called Page, that has the page numbers of all the parts standards, so instead of using an integer value, I am trying to have it take the number from the field I created(Page).
I know that I haven't explained this all th best, but I will be glad to clear up any questions regarding my issue. My code is as follows:
Thanks for taking the time to read this, I hope to hear from you
UPDATE
I've solved my problem as far as getting the data from the path.
This code gets the correct page number from the standard being viewed, which is perfect. Now, my main problem is taking this and inputting into my next line of code to tell it to open this value. So if, PageNum = Me.myPage comes out to equal 100, I need it to open to page 100. The commented out section is how it works with a specific number.
Figured I'd try help clear things up, aswell as give an update on my status!
I have a database full of part numbers, that have standard(Blueprints essentially) images that go with them. So, I want to have a button that allows the user to click and see the image of the part and all the details (Listed in a PDF). My code works perfect when I tell it to go to a specific page number. I've created a field called Page, that has the page numbers of all the parts standards, so instead of using an integer value, I am trying to have it take the number from the field I created(Page).
I know that I haven't explained this all th best, but I will be glad to clear up any questions regarding my issue. My code is as follows:
Code:
Private Sub ViewStandard_Click()
'open pdf at page #
Dim pageNum As String
Dim fileloc As String
Dim bookmark As String
pageNum = Me.myPage
Debug.Print pageNum
pat1 = """C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe"""
'pat2 = "/A ""page=20"""
pat2 = "/A " & pageNum & ""
Debug.Print pat2
pat3 = """G:\File\Path\Here\PDF.pdf"""
Shell pat1 & " " & pat2 & " " & pat3, vbNormalFocus
'fileloc = location of all hoses pdf
'bookmark = fileloc & pagenum
End Sub
Thanks for taking the time to read this, I hope to hear from you
UPDATE
I've solved my problem as far as getting the data from the path.
Code:
pageNum = Me.myPage
This code gets the correct page number from the standard being viewed, which is perfect. Now, my main problem is taking this and inputting into my next line of code to tell it to open this value. So if, PageNum = Me.myPage comes out to equal 100, I need it to open to page 100. The commented out section is how it works with a specific number.
Figured I'd try help clear things up, aswell as give an update on my status!
Last edited: