hi could u give me the code to open PDF file, or open a folder ?Thax

basicly i have a PDF file in the special location, now I want to create a button to open it on MS Access. So if anyone have any idea so pls help ! even open the folder when the PDF is also ok with me! thank

basicly i have a PDF file in the special location, now I want to create a button to open it on MS Access. So if anyone have any idea so pls help ! even open the folder when the PDF is also ok with me! thank

Hi, I'm not sure if you or anyone else is still looking for an answer to this. I came across your post trying to find an answer to the same question. I managed to figure a solution out, hopefully it helps. First I created an OLE with my pdf using the unbound object frame tool wizard, followed the directions and browsed my file, then set its visibility property to false in the properties box so you can't see it on my form. Then I created a command button (not using the wizard) and in code builder for my form the button is on used the following:

Private Sub cmdButtonName_Click()

OLEName.Action = acOLEActivate

End Sub

Where "cmdButtonName" is the name of my button, and "OLEName" is the name of my unbound OLE object.

All I have to do to open the pdf is click the command button on the form. Hope this helps!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.