Displaying PDF files stored in an OLE Data Type

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a simple table with two fields, DocID (text) and Doc (OLE data type)
in table tblDocuments. I inserted a pdf file type using the access drop down
menus and gave it a DocID of "Codes". In the table view when I double click
the Adobe Acrobat 7.0 Document in the Doc field the reader starts and the
document is displayed.

How do I get this document to open from a button's on-click event?

Thanks in advance,

Jim
 
Hi,
i never did this with PDF, but perhaps it also works - you can try to use
OLE Field .Action and .Verb properties to do so.
something like this:
Me![OLEField].Verb = acOLEVerbOpen
Me![OLEField].Action= acOLEActivate

BTW, access does not store files efficently in OLE fields, better option is
to store files on disk, and save a link to files in Access table
 
Alex,

WORKS GREAT! I put a hidden field on the form that does a dlookup for the
pdf and a button that use the .verb & .action. In the on open of the form I
check the len() of the field and if it's 0 the button is disabled.

Thanks again...Jim

Alex Dybenko said:
Hi,
i never did this with PDF, but perhaps it also works - you can try to use
OLE Field .Action and .Verb properties to do so.
something like this:
Me![OLEField].Verb = acOLEVerbOpen
Me![OLEField].Action= acOLEActivate

BTW, access does not store files efficently in OLE fields, better option is
to store files on disk, and save a link to files in Access table

--
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com


Jim said:
I have a simple table with two fields, DocID (text) and Doc (OLE data type)
in table tblDocuments. I inserted a pdf file type using the access drop
down
menus and gave it a DocID of "Codes". In the table view when I double
click
the Adobe Acrobat 7.0 Document in the Doc field the reader starts and the
document is displayed.

How do I get this document to open from a button's on-click event?

Thanks in advance,

Jim
 
Back
Top