Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening a .TIFF/.PDF From a Sub-Form

Status
Not open for further replies.

rmarsh

IS-IT--Management
Jul 25, 2002
1
US
I have .TIFF and .PDF files that I want to launch when I press a command button on a sub-form. I tried to use hyperlink, but found that some of the users were confused by a file name. I want to use a command button that simply says to "press to view". The command button should link to the sub-form record field to get the file name and extension and launch the applicable document. Any suggestions...
 
Try adding this line of code:

Call Shell(strPathtoViewer & " " & strPathtoFile, 1)

Where strPathtoFile = <<full path and file name to your viewer, eg. c:\program files\Adobe\adobeviewer.exe AND strPathto File = full path and filename of the file to open.
 
Something like this ?
Application.FollowHyperlink Forms![mainform name]![subform control name].Form![file name control]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top