VBA Code to displaying PDF

hilf

Registered User.
Local time
Today, 14:54
Joined
Oct 28, 2015
Messages
11
Hallo,

I have access 2007 and I am not an expert with Access but I want to display a PDF file in a form with Active X Control . What I need is how to open various PDF file from the folder (the folder is called “PDF”) is located in “C:\Users\RU\Desktop\PDF”.
When I write the name of the PDF in the textbox and click the button, the PDF loads directly in Form in "Aodbe PDF reader". I insert the Codes in the Button but I still get Error.It would be nice if someone tell me where the error is (Please see the access file)




Thanks in advance.
 

Attachments

You still have a way to go but look at this. Check the code window and you'll see what I did.
 

Attachments

Hallo RuralGuy,

at first I thank you for your help.
I opened the access file but I still get error when I klick the PDF button.
Thanks in advance.
 
What error are you getting? All I get is [No file matches ""]
 
Hallo RuralGuy,
I get error 438 "Object does not support this property or method" . But at first I have changed the following things (see the Picture). 1.the space between PDF and / 2. the number for AcroPDF.
 

Attachments

  • Pic.JPG
    Pic.JPG
    33.4 KB · Views: 116
I made the same changes here and do not get your error 438.
 
I think you should change my Path "C:\Users\RU\Desktop\PDF\" to your Path.
 
I'm not typing anything in the text box. Are you?
 
Okay, now I'm getting the 438 error. Will look into it.
 
I finally got the blooming thing to work. I'll post back when I figure out wnat I did. 8^)
 
I tried this one but now I get error 13 "type mismatch".
 
Post all of your Private Sub Befehl2_Click() code and we'll fix it.
 
I'm sorry but with different paths I can't do the proper testing.
 
I have changed it to "Set pdf = Me.AcroPDF3.Object" but now when I write the name of file in textbox, I get " No file matches".
 

Users who are viewing this thread

Back
Top Bottom